Gandy dancer is a slang term for workers who maintained railroads in North America. For each stroke, a worker would lift his gandy (a long handled tool) and force it into the ballast to create a fulcrum, then throw himself sideways using the gandy to check his full weight (making the "huh" sound recorded in the lyrics below) so the gandy would push the rail toward the inside of the curve. Even with all impacts from the work crew timed correctly, any progress made in shifting the track would not become visible until after a large number of repetitions.
Rhythm was necessary for this process, both to synchronize the manual labor, and to maintain the morale of workers whose exertions produced only a minuscule effect; hence "gandy dancers". The songs sung in this occupation have been recognized as a major influence on later blues music