Gog and Magog were two mythical beings, known in earth's mythology as giants. (TV: The Stones of Blood) "Gog and Magog" were names used in the Bible, while in the Koran they were known as Yajuj and Majuj. (AUDIO: The Feast of Magog)
History[]
The Fourth Doctor speculated that the myth of Gog and Magog was inspired by the Ogri of the Nine Travellers. (TV: The Stones of Blood) Other accounts claimed that the myths were based on an interdimensional species known as the Gomagog. (AUDIO: The Archive, etc.)
According to the Record of Rassilon, however, Gog and Magog were genuine primordial beings. They were given their names by Rassilon and listed among the Great Old Ones, whom Rassilon identified as members of an earlier race of Time Lords from a previous universe which had been destroyed. (PROSE: Divided Loyalties)
The Fourth Doctor himself also encountered a version of Magog in a parallel universe, where he was the most powerful of the Malevilus, who were worshipped as gods by an alternative Roman Empire, having taken over the body of Adolphus Caesar's mother Juno. They planned to do the same to Adolphus when he succeeded to the throne. Upon entering the Fourth Doctor's TARDIS, the Doctor tricked Magog into being imprisoned in an empty dimension. (COMIC: Doctor Who and the Iron Legion)
The Seventh Doctor and Ace briefly encountered Magog, or what was left of him, still trapped in the Doctor's TARDIS and pleading for release as his power was being drawn by the Mandragora Helix as it rearranged the TARDIS interior. (COMIC: The Mark of Mandragora)