Sources agree on the definition: something that quickly affects or becomes known by more and more people. Rumors, diseases, and memes can spread like wildfire. But only dictionary.com offered anything on the origin.
In the twelfth century the term “wildfire” referred to a skin disease (if it was highly contagious, the modern usage for disease sounds like it has a very old origin) and the “figurative sense is recorded from c.1300.” includes several historical examples, but all modern – for example, from The Messenger by Elizabeth Robins, 1920. News can fly and flee, as well as spread, like wildfire.