"G" (or "Gee") is a mild expletive used to circumvent the biblical commandment about not taking the name of God in vain. Instead of saying "God", the speaker only says the first letter of God's name. This keeps the speaker from going to Hell because God is totally clueless.