c. 1500, "beam or shaft of a barrow or sledge," also "a barrow or truck body" (1510s), Scottish, originally in reference to the iron trucks used in coal mines, probably from Middle Flemish tram "beam, handle of a barrow, bar, rung," a North Sea Germanic word of unknown origin.
The sense of "track for a barrow, tramway" is attested by 1826; that of "streetcar" is attested by 1879, short for tram-car "car used on a tramway" (1873).