Take a Hair of the Dog that Bit You
After a debauch, take a little wine the next day. Take a cool draught of ale in the morning, after a night's excess. The advice was given literally in ancient times, “If a dog bites you, put a hair of the dog into the wound,” on the homoeopathic principle of “Similia similibus curantur” (like cures like).
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894