It is pronounced with a hard 'G' as in jail. Only the Flintstones have a "gay-ol' time" in their opening song.
The "g" as in "jail" is, of course, a soft "g", not a hard "g"; however, you're quite right that it is pronounced as in "jail", i.e.: with a soft "g". Not a hard "g".
If you wanted it to have a hard "g", you'd probably have to put a "u" after it, as in "guarding" or "guerilla".
However, on doing a bit more digging it appears that both "gaol" and "jail" derive from the Old North French "gaiole" (perhaps pronounced "jay-ol" or "zhay-ol"), BUT this comes from the vulgar Latin "gaviola" and the classical Latin "caveola", a diminutive of "cavea", meaning cage or hollow.
Now all those of us blessed with an English classical education of a certain vintage would naturally pronounce "gaveola" with a hard "g" as a logical extension of the hard "c" in "caveola". On this basis the "gay-ol" (time) version may superficially appear correct.
The problem, as you will find if you listen to someone French reading Latin - and let's face it, what day goes by without your listening to some Frog reading Latin? - the problem is that they pronounce Latin under some system dreamt up by Erasmus in the 15th Century and which sounds a lot more like modern Italian or French.
Consequently lots of "c"s become "ch"s (eg "Caesar" becomes "Chay-zar") and "g"s become "zh"s. Unless, as noted above, they had "u"s after them, and we could complicate this a bit further by going into the concept that the "gu" format also turned into "w" (eg "warder", "William" etc), but, since I'm losing the will to live, let's not.
Anyway the interesting thing about all this is that the Old French pronunciation gives us an important clue to the origin of a recent and popular neologism. If we consider the original interpretation of "caveola" or "Chav-ay-o-la", it is clearly intended to describe a small dark hole where you ought to lock up Chavs.