There are myriads of variations on swear words and curses, used in order to convey the meaing of the original curse without actually saying it.
Examples are cussing for cursing or (god)darn(ed)! for (~)damn(ed)!
In this case, however, there may be another issue. In some places, during certain times (and still today), calling upon a deity or saint for their assistance would be very common. Now, if this is done in a proper way and for proper reasons, according to the prevailing faith, denomination and clergy of that time and place, nobody sees it as wrong (and it is often called praying).
However, if a deity or saint is called upon in a moment of anger or frustration, this is sometimes seem as breaking the rules - more specifically, on of the 10 judeo-christian commandmends.
In order to mitigate the offensive expletive, you can add whaever you like to change the offending expletive into an innocent sentence or expression.
I have personally observed the shortest Bible verse of the King James Bible being used on occasions where other people might have used more explicit curses: Jesus wept!
The expression from Gone with the wind is an innocent enough expression but it does enable the speaker to vent some emotion in exclaiming the word god. I would go so far as to say that deity or saint + innocent addition is a snowclone.
With a few exceptions (such as the bible verse) I'm not quite sure whether the exact origin of every single variation can be traced. This specific one might well be made up by the author, or it may have been a local favorite in her area.