Old English 'witnes' (knowledge, testimony), from 'wit' (knowledge) — rooted in PIE *weyd- (to see, to know).
A person who sees an event happen and can give testimony about it; one who provides evidence in a court of law.
From Old English 'witnes' (attestation, knowledge, testimony), derived from 'wit' (knowledge, understanding) plus the suffix '-nes' (denoting a state or condition). 'Wit' comes from Proto-Germanic '*witją' (knowledge), from Proto-Indo-European '*weyd-' (to see, to know). The original meaning was 'knowledge' or 'the state of knowing,'
The phrase 'wit's end' preserves the old meaning of 'wit' as knowledge or mental capacity. A witness, etymologically, is someone in a state of knowing — the same root that gives us 'wise,' 'wizard' (a wise one), and 'wisdom.' Seeing and knowing were the same concept to our Indo-European