c. 1200, cointe, cwointe, "cunning, artful, ingenious; proud," in both good and bad senses, from Old French cointe, queinte "knowledgeable, well-informed; clever; arrogant, proud; elegant, gracious," from Latin cognitus "known, approved," past participle of cognoscere "get or come to know well" (see cognizance). Modern spelling is from early 14c. (see Q).
The old senses all are archaic or obsolete. Perhaps the fuzziness of the good and bad senses in the word contributed to this. Compare Middle English queintise (n.) "wisdom, knowledge," also "guile, cunning, deceit" (c. 1300).
Later in English, quaint came to mean "elaborate, skillfully made" (c. 1300); "strange and clever, fanciful, odd whimsical" (mid-14c.). The sense of "unusual or old-fashioned but charming or agreeable" is attested by 1782, and at that time could describe the word itself, which had become rare after c. 1700 (though it soon recovered popularity in this secondary sense). Related: Quaintly; quaintness.