Galls are formed by the host plant as a reaction to chemicals being injected by gall wasps. The gall forms protection to the larvae of the wasps until they emerge in the spring as young adult wasps. Each Gall wasp specialises in a particular plant which aids identification of the wasp larvae by identifying the plant on which the Gall is formed. It is fascinating to see this interaction between insects and plants. It is easy to appreciate the advantage given to the wasp by this relationship but I cannot think of any advantage for the plant.