Hair of the Dog (That Bit You)

What does the idiom “hair of the dog” mean?

Definition: A small amount of the alcoholic beverage that caused your hangover

Example: Do you have a hangover? Try a hair of the dog that bit you.