Organic gardeners, like myself, must try to remember that everything is made out of chemicals including ourselves and the vegetables we eat. Some chemicals are more dangerous than others. This includes “natural” chemicals like belladonna (atropine) and digitalis. A great number of medicines started their lives as plant extracts like these. Salicylic acid has been found in most plants and was first extracted from the bark of a willow. Aspirin (acetylsalicylic acid) is made from salicylic acid.
Some scientists asked the question why do plants produce this chemical and it turns out to be part of the plants immune system; the way that it combats disease and pests. There is a lot more information here:
This is not the only immune system that has been discovered in plants; however it is the one that amateur gardeners could use to help them in their garden or allotment.
A more effective way of extracting salicylic acid from willow bark is to make it into a tea using boiling water.