'Gosh' is a common substitute for the word 'God' in phrases such as 'Oh My Gosh' or 'By Gosh' or just 'Gosh'. Is this just a corruption of the word 'God' or does it have some other provenance? How long has it been in use?
This question is too basic; it can be definitively and permanently answered by a single link to a standard internet reference source designed specifically to find that type of information.If this question can be reworded to fit the rules in the help center, please edit the question.
The OED calls it a ‘mincing pronunciation of god’. The earliest citation is dated 1757.
Gosh has no literal meaning. It's not supposed to.
It's a Euphemism, which means it's a word that is used instead of a taboo word (in this case, as you suggest, the taboo word is God).
This is word magic, and the usual magic principle that requires correct pronunciation to effect magical results applies. (For example, in the case of Sanskrit, correct pronunciation of the Vedas was believed to be necessary for the preservation of the Universe, leading directly to the invention and development of a scientific phonetics by Pāṇini)
Specifically, if you offend a Power by saying its name, or referring to something forbidden, you may be noticed and punished; so you avoid that by saying something similar enough to be recognized, which the Power nevertheless might not notice, or might not be offended by.
The Greeks, who invented the term euphemism (from eu- 'good' + phazein 'speak'), attempted to apply it to the gods themselves; notably the Furies, who caused bad things to happen, by renaming them the Eumenides, or 'Gracious Ones', as chronicled by Aeschylus.
English is full of euphemisms; similar monosyllabic phonological euphemisms include geez (for Jesus), heck (for hell), shoot (for shit), futz (for fuck), etc. There are many other kinds, and there is a very thorough and fascinating discussion of the topic on Wikipedia .
Etymonline has this on the word:
but offers no additional information on gosse other than as a German word for gutter under the entry for gut.
Wikitonary's listing for gosse also seems to hold no further clues.
Here's a clip of the earliest use in print from Barry's OED answer:
This is from a 1765 collection of Samuel Foote's plays. This play, The Author, was originally published in 1757. He uses the phrase once again later in the same play:
Just figured out that the by gosse mentioned at Etymonline is from Ralph Roister Doister, a comic play by Nicholas Udall generally regarded as the first comedy to be written in the English language. It was published c. 1567. Here is a clip from the play reprinted in 1821: