Green’s Dictionary of Slang

god-damn v.

1. (also goddam) to curse, an all-purpose profanity, used in a variety of oaths; often as God damn me!; thus god-damn it! excl.

2. [1910s–30s] to swear.

In exclamations

I’ll be goddamned! (also I’ll be goddam!)

[mid-19C+] a general excl. of emphasis or surprise, implying one’s refusal to accept a given situation; lit. ‘cursed’.