If I remember rightly, someone posted this very question a month or so back. Pity I saw the question but didn't catch any answers!
Many years ago there was a popular belief in an alternative medicine with a slightly holistic theme. Anyway, the doctrine went - "What makes you bad can make you better". So the cure for a dog bite was to drink a concoction containing a "hair of the dog that bit you". This phrase carried over into everyday use, particularly relating to a hangover, where a "hair of the dog" is an alcoholic drink the day after alcohol caused your hangover.