"a type of violet, popular as a garden flower," mid-15c., pense, from Old French pensee. pencee "a pansy," literally "thought, remembrance," from fem. past participle of penser "to think," from Latin pensare "consider," a figurative use of a frequentative of pendere "to hang, cause to hang; weigh; pay" (from PIE root *(s)pen- "to draw, stretch, spin"). So called because it was regarded as a symbol of thought or remembrance.
Meaning "effeminate homosexual man" is recorded by 1929. Related: Pansified (1941) "over-adorned, affectedly effeminate."