I thought it means "damned by God" until I read that Christians may find it offensive, hence I thought it may mean cursing G*d (God forbid) not God cursing! Which is it?
It means very little. If someone says "I can't find the goddamn remote control", it has the same meaning as "I can't find the remote control". The curse word just indicates the speaker's frustration.
It comes from "God damn" - exactly as you say "damned by God", ie judged and doomed to punishment in Hell. Taken literally the speaker is saying that the remote control has been (or should be) sent to eternal suffering (!)
There are people (particularly some Christians and Muslims) who may find it offensive because it invokes God and punishment in Hell in a trivial or casual way.
However, I notice you are from Iran. The vast majority of people in the UK are much more relaxed about religion than in Iran. "Goddamn" is coarse, but not offensive to the vast majority of English people, most of whom aren't Christian.
The expression is very old. Most slang is less than 100 years old, and slang from 20 years ago can seem dated. This dates back to at least the 14th century, and was common enough that French soldiers would refer to English soldiers as "Goddem". (etymoline)
American English speakers often refer to the use of all kinds of offensive words as "cursing" (or 'cussing'). Actually, "God damn" is probably one of the few utterances that is really a 'curse'. Originally, if someone said "God damn you" it meant that you were wishing that God would 'damn' the person, meaning send them to hell. A 'curse' literally means to declare or threaten evil upon a person by supernatural means.
These days, few people would actually believe that such words would have that literal result - even Christians. The teachings of Christ actually state that persons should not wish evil upon or judge others!
The reason why many Christians object to language such as "God damn", "oh my God", or any use of 'God' is because they equate it with the command in the Hebrew scriptures (canon to both Jews and Christians) at Exodus 20:7 to "not take the name of the LORD your God in vain". "In vain" could be rendered as "in a worthless way", so any mention of God that is trivial or unnecessary could be seen as breaking this commandment. Ironically, the actual name of God found in the original Hebrew texts was removed by many translators - wherever you see 'LORD' in capital letters as in the quotation above this denotes in many English translations that this is a substitute for God's name. 'God' is simply a title, so using this is not strictly taking his 'name' in vain.
To sum up - religious people mostly object to curse words that mention God simply on the basis that it is a misuse of the word as a 'swear' word, not because of any historic meaning as a literal 'curse'. The fact that most swear words could be substituted for any number of other words to add the same emphasis shows that any literal meaning has long since been lost.