tart (adj.) Look up tart at Dictionary.com
"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 *der- (2) "to split, flay, peel" (see tear (v.1)), 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.
tart (n.1) Look up tart at Dictionary.com
"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."
tart (n.2) Look up tart at Dictionary.com
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.