Contraction of gosh + darn + it, euphemistic forms of God and damn. Compare goshdangit, goddammit.
goshdarnit!