1757, altered pronunciation of God. Probably from by gosse (mid-16c.).
A mild exclamation of pleasure, disbelief, surprise, etc: Gosh but I'm tickled, Reverend
[1757+; a euphemism for God]