"a leg," 1781, see gams. Called "cant" in the oldest citation.
Entries linking to gam
gams n.
"legs," 1781, low slang, probably the same word as gamb "leg of an animal on a coat of arms" (1727) and ultimately from Middle English gamb "leg," which is from French (see gammon). Now, in American English slang, especially with reference to well-formed legs of pretty women, but this was not the original sense.