Sheep have provided wool to humans since ancient times. The fine, soft hairs have remarkable properties of insulation, resilience, and ability to take dye. Given how important this textile has been over the centuries, it's no surprise that figures of speech involving wool are woven into the very fabric of our English language.
In the face of grinding poverty in feudal England, peasant children were granted the right to wander the countryside gathering tufts of wool snagged on thorns and hedges by passing sheep. For many families, this was the only source of homespun clothing. Since sheep graze in a scattered manner, woolgatherers did not proceed in a straight line. They moved erratically from tuft to tuft, finding a little here, a little there - somewhat like a daydreamer's wandering state of mind. Today, woolgathering has nothing to do with sheep. Webster's calls it "idle daydreaming." "The randomness of free association" (Brewer's Dictionary) is a kinder metaphor for how children might have freely, even playfully gathered scarce wool.
'Pull the wool over '
someone 's eyes
This term, meaning to deceive or dupe someone, may come from the custom of wearing a (woolen) wig. One source suggests that it refers to a judge's wig slipping over his eyes, temporarily blinding him. Other sources note that wigs are not the only things that dupe. A woolen stocking cap or hood can do the trick, too: hence the term "hoodwink," which also means to mislead or dupe.
Years ago, black sheep were so rare that there was never enough black wool to take to market. Black wool could not be dyed, either, so the sheep were regarded as practically worthless. It didn't help that people thought black was an evil color. That, and the fact that black sheep stand out among their white-fleeced flockmates, led to this term for an outcast in a family or group.