Old English cnawan (class VII strong verb; past tense cneow, past participle cnawen), "to know, perceive; acknowledge, declare," from Proto-Germanic *knew- (cf. Old High German bi-chnaan, ir-chnaan "to know"), from PIE root *gno- "to know" (cf. Old Persian xšnasatiy "he shall know;" Old Church Slavonic znati, Russian znat "to know;" Latin gnoscere; Greek *gno-, as in gignoskein; Sanskrit jna- "know"). Once widespread in Germanic, this form is now retained only in English, where however it has widespread application, covering meanings that require two or more verbs in other languages (e.g. German wissen, kennen, erkennen and in part können; French connaître, savoir; Latin novisse, cognoscere; Old Church Slavonic znaja, vemi). The Anglo-Saxons used two distinct words for this, witan (see wit) and cnawan.
Meaning "to have sexual intercourse with" is attested from c.1200, from the Old Testament. To not know one's ass from one's elbow is from 1930. To know better "to have learned from experience" is from 1704. You know as a parenthetical filler is from 1712, but it has roots in 14c. To know too much (to be allowed to live, escape, etc.) is from 1872. As an expression of surprise, what do you know attested by 1914.