Spock, who studied Earth history from a text prepared by Gill, was impressed by his treatment of history as "causes and motivations rather than dates and events." James T. Kirk, who studied under Gill at Starfleet Academy, remembered him as "the kindest, gentlest man I ever knew." (TOS: "Patterns of Force")
In the mid-2260s, John Gill was stationed on the planet Ekos as a cultural observer. He concluded that the planet was in a state of anarchy and took it upon himself to use his knowledge of history to help the local people. To this end, he created a version of National Socialism, modeled on Earth's Germany during the 1940s, hoping to focus the Ekosians on social and economic renewal without the racial and/or religious persecution that marked the original version. Professor Gill provided a much-needed structure to the Ekosian society by giving them the Nazis' richly symbolic culture to build on.
When Captain Kirk and Commander Spock beamed down to Ekos, they were stunned to find a mid-20th century style Nazi-state bent on destroying the neighboring planet, Zeon, and all the Zeons living on Ekos. Kirk and Spock were also shocked to learn that John Gill had somehow become the Führer of Ekos.
When Kirk finally managed to locate Gill, the captain found his old history professor in extremely bad health. Apparently, Gill had been drugged by the Deputy Führer, Melakon. After Dr. McCoy administered several injections of a stimulant into Gill's body, Spock performed a mind meld on the historian, enabling Gill to answer Kirk's questions. Gill claimed that when he had first arrived on Ekos, he had found the planet in such a fragmented and divided state that he decided to break the Prime Directive in order to transform Ekos into a simulation of the most efficient state Earth had ever known. According to Gill, his plan had initially worked until Melakon began to drug him.
As Gill's attention returned to his current situation, Kirk urged the historian to notify the Ekosians of Melakon's betrayal before the Final Decision to destroy Zeon began. Gill was able to transmit a message to the Ekosians, recalling the invasion force heading for Zeon, and insisting that he, not the people of Ekos, bore the blame for this aggression. He then denounced Melakon as a traitor, at which point the Deputy Führer grabbed a soldier's submachine gun and assassinated Gill before he himself was killed by Isak, a Zeon resistance fighter. Before Gill died, he admitted to Kirk he was wrong to violate the Prime Directive, and commented on the irony that even historians fail to learn the lessons of history. (TOS: "Patterns of Force")
John Gill was played by David Brian.
In the reference book the Star Fleet Medical Reference Manual, an essay titled "Historical Trends in Medicine" by John Gill serves as the introduction. He is listed as holding the academic degree of Doctor of Philosophy (Ph.D.), and it references several historical medical landmark works, such as The Surgeons Mate, a real-life Navy guide written in the 17th century, and several from the Star Trek universe.
Publications by John Gill, e.g., Small Steps and Giant Leaps: A History of Humankind in the Galaxy from 2143 or a multi-volume series about World War III, are also mentioned in the reference book Star Trek: Federation - The First 150 Years.