Following the establishment of the Central Intelligence Agency in 1947, Gaynor was recruited as a member of the agency's research staff. On February 22, 1951, Gaynor was appointed Chief of Research Staff at the CIA's Office of Security, a position which he initially served until May 1957.[8] During this period, Gaynor and his staff launched a large-scale investigation into homosexual employees in the federal government.[9][10] Gaynor's "fag file" was eventually uncovered by one State Department employee, John C. Montgomery, who allegedly committed suicide as a result.[9][11]
Gaynor also became the subject of harsh criticism by CIA Director Allen Dulles, who cautioned Gaynor against his overt support for former Nazi sympathizers in the US government, such as John B. Trevor Jr., as well as congressman Hamilton Fish III.[9]
In 1951, Gaynor was selected by CIA Director Walter Bedell Smith to oversee the agency's new interrogation program, Project ARTICHOKE. The aim of the project was to test drugs on human subjects to determine if these drugs could lead an individual to involuntarily perform an act of attempted assassination. Gaynor was chosen in part due to his experience as an interrogation officer during the war, as well as the CIA's desire to collaborate with the Armed Forces for the project. Gaynor believed human experimentation to be of extreme value and scientific importance, stating that, "It is imperative that [the CIA] move forward more aggressively on identifying and securing a reliable, ready group, or groups, of human research subjects for ongoing Artichoke experimentation."[9][12]
Project ARTICHOKE was brought under Project MK Ultra following the latter project's launch on April 13, 1953. Whereas previous ARTICHOKE experiments had primarily been conducted abroad, Gaynor initiated a new series of experiments to be tested within the borders of the United States. Gaynor also proposed the establishment of fake left-wing organizations run by the CIA to intercept "undesirable aliens" to be used as subjects for MKUltra, and approved of a plan to recruit over 4,000 military personnel serving court-martial sentences in federal prisons to be experimented on.[9]
In September 1959, Gaynor was reinstated as the Office of Security's Chief of Research Staff.[8]
Gaynor was among the CIA operatives interviewed during the congressional investigation into the CIA's alleged involvement in the Watergate scandal. During the interview, Gaynor was asked about his relationship with fellow CIA operative and Richard Nixon campaign manager James W. McCord Jr., who had worked in the Office of Security under Gaynor between 1955 and 1962, and had exchanged several letters with Gaynor in the years following.[8][10] Later, after a report by Gaynor detailing McCord's involvement in the Watergate break-in was uncovered,[13] Gaynor refused to comment on its discovery, claiming that the incident reported had been "blown out of proportion".[14] Gaynor was also mentioned briefly during the Watergate hearings when CIA deputy director Vernon A. Walters referred to a memorandum from Gaynor detailing CIA activities in Mexico.[2][3]
Gaynor was awarded the Intelligence Medal of Merit upon his retirement from the CIA in 1973. He died suddenly at his home in Arlington County, Virginia on May 13, 1975, aged 60.[2]