The Doctor Who episode The Myth Makers witnesses the TARDIS and its occupants arriving near ancient Troy, which had been at war with Greece for ten long years. Achilles and Hector are fighting and after Hector insults the gods of Greece including Zeus, and so when the Doctor suddenly emerges from the TARDIS, he is mistaken for Zeus by both of them!
This is an episode from which all parts are missing, but the audio has survived and can be listened to in audiobook form, with added narration to help the listener follow the action. The scripts are also available online.The Doctor ends up among the Greeks, while the TARDIS, with Vicki inside, ends up in Troy. The Doctor is forced to come up with a way for the Greeks to finally take the city, and initially the Doctor suggests creating gliders to fly Greek soldiers over the walls. But he soon realizes this will not work, and so – even though he had earlier dismissed the story of the Trojan Horse as something most likely made up by Homer – he suggests the making of a giant wooden horse, in which Greek soldiers may hide.
The episode is on the whole comically entertaining.
It is interesting to note that this episode of Doctor Who aired before the Star Trek episode “Who Mourns for Adonais?” which likewise suggested that the Greek gods could have been aliens mistaken for deities.
Later episodes such as “The Daemons” from the Jon Pertwee era would explore further the idea that classic human gods were aliens.
Does anyone know what the first science fiction story was that suggested something along these lines?