Dadgum is originally a light curse word to display mild feelings of annoyance.  It is either an adverb or adjective, but never a noun.