During the Korean War, Gavin was commissioned in the U.S. Navy serving aboard the off Korea where he served as an air intelligence officer from 1951 until the end of the war in 1953. Due to Gavin's fluency in both Spanish and Portuguese, he was assigned as Flag Lieutenant to Admiral Milton E. Miles until he completed his four-year tour of duty in 1955. He received an award for his work in the Honduras floods of 1954.