How did ancient people fight off the first allergies?
This is a good question, and there is not much information. In fact, there is not much mention of hay fever type allergies in ancient sources, although ancient people were aware of allergic reactions to animals and foods. According the Psychoneuroimmunology by Robert Ader, the earliest report of an allergic reaction was King Menses of Egypt, who died of a wasp sting some time between 3640 - 3300 BCE. Ader also reports that Britannicus, the son of emperor Claudius, was so allergic to horses that his eyes would swell shut and he couldn't see where he was going. In these cases, the remedy was to avoid horses as much as possible.
Hay fever - which is an allergic reaction to dust, mold, and pollen - was not formally described until 1906. This does not mean these did not exist (although see below), just that it was not recognized as a specific phenomenon. The ancients did know about breathing problems (asthma), and there are numerous treatments mentioned in ancient sources. These fall into two categories - inhaling steam that has been scented with herbs, and taking tea that includes stimulants known to cause bronchodilation (particularly ephedra in China). Both of these methods are somewhat effective.
For a while, I lived in a place called Johnson Mesa, New Mexico. I never figured out what it was, but I was extraordinarily allergic to something there. I read in a book that a common folk remedy for allergies was to take the resinous sap of a plant and paint that inside your nose. Supposedly this remedy went all the way back to Plains Indians. The theory is that the sap causes pollen to stick so you don't inhale it. It did not work so well.
While we find that there are symptoms described in ancient sources that are similar to allergies, it definitely was not very important to them. In fact, research shows that allergies are much more common among industrialized nations, and that they are becoming more and more common as people become increasingly urbanized. The cause for this seems to be related to the reduced incidence of parasites. Our immune system evolved to fight off parasites, and if you do not have parasites it will turn against things like pollens and molds. Allergies are essentially an over-reaction to these relatively harmless irritants. People can reduce their allergies by infecting themselves with parasites. If you are interested in ordering some hookworms, click here. There is an interesting article about parasites and allergies from Smithsonian Magazine that you can read here.