It's not a phrase I have come across very much in my life. At least, not spelt out like that. According to Google's Ngram viewer, usage peaked in the 1920s. Perhaps everyone exclaimed it whilst doing the Charleston or something. I came across it many years later, in a series of Grange Hill novels stocked in my high school library. Books with stories of Ziggy and Whammo and loads of other characters who had long gone from the TV screen. But which I read anyway. And on every page there seemed to be someone whining "Oh Gawd", "Good Gawd", or perhaps just "Gawd!"