Figurative expression pull the wool over (someone's) eyes is recorded from 1838, American English. To be literally dyed in the wool (1725, as opposed to dyed in the piece) is to be so before spinning, while the material is in its raw state, which has a more durable effect; hence the figurative sense "from the beginning; most thoroughly," attested from 1809, and especially, in U.S. politics, from 1830.
"fix a color or colors in the substance of by immersion in coloring matter held in solution," Middle English deien, Old English deagian "to dye," from the source of dye (n.). Spelling distinction between dye and die was not firm till 19c. "Johnson in his Dictionary, spelled them both die, while Addison, his near contemporary, spelled both dye" [Barnhart]. Related: dyed. For dyed in the wool (or grain) see wool (n.).
The Welsh origin is not a universally accepted etymology, due to the sound changes involved; Barnhart, Gamillscheg, Diez suggest the English word is from an Anglo-French diminutive of Old French flaine "a kind of coarse wool." Modern French flanelle is a 17c. borrowing from English.