also hairsbreadth, hairs-breadth, hair's breadth, from late 15c. as a measure of minute exactness. It is said to once have been a formal unit of measure equal to one-forty-eighth of an inch. From hair + breadth.
Old English hær "hair, a hair," from Proto-Germanic *hēran (source also of Old Saxon, Old Norse, Old High German har, Old Frisian her, Dutch and German haar "hair"), perhaps from PIE *ghers- "to stand out, to bristle, rise to a point" (source also of Lithuanian šerys "bristle;" see horror).
Spelling influenced by Old Norse har and Old English haire "haircloth," from Old French haire, from Frankish *harja or some other Germanic source (see above). Hair-dye is from 1803. To let one's hair down "become familiar" is first recorded 1850. Homeopathic phrase hair of the dog (that bit you), remedy from the same thing that caused the malady, especially a drink on the morning after a debauch, 1540s in English, is in Pliny.