The story
Originally an expression of abuse to wish that someone develop pocks, that is to say, contract pox. Though pox can range from smallpox to chickenpox to cowpox to syphilis, this expression almost always referred to the last one, the Great Pox.
Etymology from Wiktionary, CC BY-SA 4.0.