"patch of ground around a house," Old English geard "fenced enclosure, garden, court; residence, house," from Proto-Germanic *gardan- (source also of Old Norse garðr "enclosure, garden, yard;" Old Frisian garda, Dutch gaard, Old High German garto, German Garten "garden;" Gothic gards "house," garda "stall"), of uncertain origin, perhaps from PIE *ghor-to-, suffixed form of root *gher- (1) "to grasp, enclose," with derivatives meaning "enclosure."
As "college campus enclosed by the main buildings," 1630s. Shipyard is from c. 1700. In railway usage, "ground adjacent to a train station or terminus, used for switching or coupling trains," 1827. Yard sale is attested by 1976.
measure of length, Old English gerd (Mercian), gierd (West Saxon) "rod, staff, stick; measure of length," from West Germanic *gazdijo, from Proto-Germanic *gazdjo "stick, rod" (source also of Old Saxon gerda, Old Frisian ierde, Dutch gard "rod;" Old High German garta, German gerte "switch, twig," Old Norse gaddr "spike, sting, nail"), from PIE root *ghazdh-o- "rod, staff, pole" (source also of Latin hasta "shaft, staff"). The nautical yard-arm retains the original sense of "stick."
Originally in Anglo-Saxon times a land measure of roughly 5 meters (a length later called rod, pole, or perch). Modern measure of "three feet" is attested from late 14c. (earlier rough equivalent was the ell of 45 inches, and the verge). In Middle English and after, the word also was a euphemism for "penis" (as in "Love's Labour's Lost," V.ii.676). Slang meaning "one hundred dollars" first attested 1926, American English. Middle English yerd (Old English gierd) also was "yard-land, yard of land," a varying measure but often about 30 acres or a quarter of a hide.