"mental capacity," Old English wit, witt, more commonly gewit "understanding, intellect, sense; knowledge, consciousness, conscience," from Proto-Germanic *wit- (source also of Old Saxon wit, Old Norse vit, Danish vid, Swedish vett, Old Frisian wit, Old High German wizzi "knowledge, understanding, intelligence, mind," German Witz "wit, witticism, joke," Gothic unwiti "ignorance"), from PIE root *weid- "to see," metaphorically "to know." Related to Old English witan "to know" (source of wit (v.)).
Meaning "ability to connect ideas and express them in an amusing way" is first recorded 1540s; that of "person of wit or learning" is from late 15c. For nuances of usage, see humor (n.). Witjar was old slang (18c.) for "head, skull." Witling (1690s) was "a pretender to wit."
A witty saying proves nothing. [Voltaire, Diner du Comte de Boulainvilliers]
Wit ought to be five or six degrees above the ideas that form the intelligence of an audience. [Stendhal, "Life of Henry Brulard"]
"to know" (archaic), Old English witan (past tense wast, past participle witen) "to know, beware of or conscious of, understand, observe, ascertain, learn," from Proto-Germanic *witanan "to have seen," hence "to know" (source also of Old Saxon witan, Old Norse vita, Old Frisian wita, Middle Dutch, Dutch weten, Old High German wizzan, German wissen, Gothic witan "to know"), from PIE root *weid- "to see." The phrase to wit, almost the only surviving use of the verb, is first recorded 1570s, from earlier that is to wit (mid-14c.), probably a loan-translation of Anglo-French cestasavoir, used to render Latin videlicet (see viz.).