A "Gandy Dancer" was a railroad worker. The professional name was "Section worker". These railroad employees laid, repaired, and maintained railroad tracks before being outdated by modern machines.

The origin of the term "Gandy Dancer" is unknown, but research indicates the term may have come from the "Gandy Tool Company", who manufactured the tools required to build and maintain railways.

A more colorful explanation comes from the movement of the workers as they chanted while swinging the large hammers and tools in the laying and repair of the rails. One origin speculates it was the manner the workers would waddle like ganders (geese) as they walked down the rails.

More Info: en.wikipedia.org