smart (v.) Look up smart at Dictionary.com
Old English smeortan "be painful," from West Germanic *smert- (cf. Middle Dutch smerten, Dutch smarten, Old High German smerzan, German schmerzen "to pain," originally "to bite"), from PIE *(s)merd-, from root *(s)mer- "to rub, pound" (cf. Greek smerdnos "terrible, dreadful," Sanskrit mardayati "grinds, rubs, crushes," Latin mordere "to bite").
smart (adj.) Look up smart at Dictionary.com
late Old English smeart "sharp, severe, stinging," related to smeortan (see smart (v.)). Meaning "quick, active, clever" is attested from c.1300, probably from the notion of "cutting" wit, words, etc.; meaning "trim in attire" first attested 1718, "ascending from the kitchen to the drawing-room c.1880." [Weekley]

In reference to devices, "behaving as though guided by intelligence" (e.g. smart bomb) first attested 1972. Smarts "good sense, intelligence," is first recorded 1968. Smart cookie is from 1948; smarty-pants first attested 1941.