In 1981, Scientists noticed the presence of a rogue planet approaching Earth. This planet was promptly called Gorath, and it was realised that Gorath would destroy Earth if the two planets collided, requiring a task-force to figure out how to deflect it.
In the film, it is explained that a giant meteor that goes by the name of "Gorath" is heading towards Earth. Moments before it reaches Earth's atmosphere, Godzilla blasts Gorath with its atomic beam. Gorath is destroyed, but from it emerges Monster X, who lands behind Godzilla, starting the final battle.