smart (adj.) Look up smart at Dictionary.com
late Old English smeart "painful, severe, stinging; causing a sharp pain," related to smeortan (see smart (v.)). Meaning "executed with force and vigor" is from c. 1300. Meaning "quick, active, clever" is attested from c. 1300, from the notion of "cutting" wit, words, etc., or else "keen in bargaining." Meaning "trim in attire" first attested 1718, "ascending from the kitchen to the drawing-room c. 1880" [Weekley]. For sense evolution, compare sharp (adj.).

In reference to devices, the sense of "behaving as though guided by intelligence" (as in smart bomb) first attested 1972. Smarts "good sense, intelligence," is first recorded 1968 (Middle English had ingeny "intellectual capacity, cleverness" (early 15c.)). Smart cookie is from 1948.
smart (v.) Look up smart at Dictionary.com
Old English smeortan "be painful," from Proto-Germanic *smarta- (source also of Middle Dutch smerten, Dutch smarten, Old High German smerzan, German schmerzen "to pain," originally "to bite"), from PIE *smerd- "pain," an extension of the root *mer- (2) "to rub; to harm" (source also of Greek smerdnos "terrible, dreadful," Sanskrit mardayati "grinds, rubs, crushes," Latin mordere "to bite"). Related: Smarted; smarting.
smart (n.) Look up smart at Dictionary.com
"sharp pain," c. 1200, from sharp (adj.). Cognate with Middle Dutch smerte, Dutch smart, Old High German smerzo, German Schmerz "pain."