 Trainor was born on September 2, 1928, in the Bronx, New York City.In 1946, Trainor enlisted in the United States Marine Corps after high school and served until his selection as a midshipman in the Naval Reserve Officer Training Corps (NROTC) in 1947.He then attended the College of the Holy Cross, where he earned his Bachelor of Arts degree in history and was commissioned a Marine second lieutenant upon graduation in June 1951.