tinker's damntin·ker's damn
Origin of tinker's damnfrom tinker + damn: with reference to the lowly status and reputed profane speech of tinkers
also tin·ker's dam
Origin of tinker's damnProbably from the reputation of tinkers for cursing
However, this is just polish added to an old phrase, as not worth a damn predates the use of tinker's damn. The reference to tinkers was added for emphasis and colour - tinkers were known for swearing, so a damn from a tinker was particularly worthless. Also, it was a way, as with "Fudge" or "Geez Louise" or a million other soft-core curses, to avoid saying the actual word "damn" while pronouncing the word "dam".