Green’s Dictionary of Slang

god-damn adj.

also goddam, god-dern

1. [mid-19C+] a general intensifier, lit. ‘most damnable’.

2. [1940s+] as infix.