The story
From a humorously altered pronunciation of oh my God. Popularized by an image macro meme in 2012, which features the text "ermahgerd, Gersberms" overlaid on a photo of a teenage girl making a silly face and holding several Goosebumps books. The girl in the photo has a visible orthodontic retainer. The pronunciation spelling is intended to mimic the speech of a wearer of this device.
Etymology from Wiktionary, CC BY-SA 4.0.