Gordon was one of the third group of astronauts named by NASA in October 1963. He served as backup Pilot for the Gemini 8 flight. In September 1966, he made his first space flight as Pilot of Gemini 11, alongside Pete Conrad. On the flight, Gordon performed two spacewalks, which included attaching a tether to the Agena and retrieving a nuclear emulsion experiment package.
Gordon was subsequently assigned as backup Command Module Pilot for Apollo 9. In November 1969, he flew as Command Module Pilot of Apollo 12, the second manned mission to land on the Moon. While his crew mates, Pete Conrad and Alan Bean, landed in the Ocean of Storms, Gordon remained in lunar orbit aboard the Command Module, Yankee Clipper, photographing tentative landing sites for future missions.
After Apollo 12, Gordon was assigned as backup Commander of Apollo 15. He was slated to walk on the Moon as Commander of Apollo 18, but that mission was canceled because of budget cuts.