"having a sharp taste," 1520s, also attested once, obscurely, from late 14c., perhaps from Old English teart "painful, sharp, severe, rough" (in reference to punishment, pain, suffering), from Germanic *ter-t-, from PIE root *der- "to split, flay, peel." But the gap in the record is unexplained. Figurative use, with reference to words, speech, etc., is attested from c. 1600. Related: Tartly; tartness, both also absent in Middle English.
"small pie," late 14c., from Old French tarte "flat, open-topped pastry" (13c.), possibly an alteration of torte, from Late Latin torta "round loaf of bread" (in Medieval Latin "a cake, tart"), perhaps from past participle of torquere "to twist" (from PIE root *terkw- "to twist").
1887, "prostitute, immoral woman," from earlier use as a term of endearment to a girl or woman (1864), sometimes said to be a shortening of sweetheart. But another theory traces it to jam-tart (see tart (n.1)), which was British slang early 19c. for "attractive woman." Diminutive tartlet attested from 1890. To tart (something) up is from 1938. Related: Tarted.