The story
In the sense "a game mode where the player character is invulnerable to damage", attested at least since 1990, as a cheat code activation message in the game Commander Keen: Marooned on Mars ("God mode enabled").
Etymology from Wiktionary, CC BY-SA 4.0.