What was the original meaning of the expression “a hair of the dog that bit you” (a cure from hangover)?

Culture Trivia: What was the original meaning of the expression “a hair of the dog that bit you” (a cure from hangover)?