Old English tun "enclosure, garden, field, yard; farm, manor; homestead, dwelling house, mansion;" later "group of houses, village, farm," from Proto-Germanic *tunaz, *tunan "fortified place" (source also of Old Saxon, Old Norse, Old Frisian tun "fence, hedge," Middle Dutch tuun "fence," Dutch tuin "garden," Old High German zun, German Zaun "fence, hedge"), an early borrowing from Celtic *dunon "hill, hill-fort" (source also of Old Irish dun, Welsh din "fortress, fortified place, camp," dinas "city," Gaulish-Latin -dunum in place names), from PIE *dhu-no- "enclosed, fortified place, hill-fort," from root *dheue- "to close, finish, come full circle" (see down (n.2)).
Meaning "inhabited place larger than a village" (mid-12c.) arose after the Norman conquest from the use of this word to correspond to French ville. The modern word is partially a generic term, applicable to cities of great size as well as places intermediate between a city and a village; such use is unusual, the only parallel is perhaps Latin oppidium, which occasionally was applied even to Rome or Athens (each of which was more properly an urbs).
First record of town hall is from late 15c. Town ball, version of baseball, is recorded from 1852. Town car (1907) originally was a motor car with an enclosed passenger compartment and open driver's seat. On the town "living the high life" is from 1712. Go to town "do (something) energetically" is first recorded 1933. Man about town "one constantly seen at public and private functions" is attested from 1734.