How do plant galls form?
I'd like to add to Amy's excellent answer.

Generally, galls are induced by the forced accumulation of plant hormones at different levels to those naturally maintained by the plant, in a localised area. Usually the hormones targeted are auxins and cytokinins which are both involved in the regulation of normal growth patterns; disrupting these patterns leads to disorganised growth, or in some cases a differently organised growth. There are several methods that I know of:


The gall inducer directly synthesising the hormone.
The inducer chemically inducing the host to synthesise more hormone.
The inducer chemically inducing the host to transport more hormone to the site.
The inducer genetically modifying the host to cause synthesis of the hormone in the host cell.


Some examples of the different methods:

Direct production: The bacterium Pseudomonas savastanoi directly produces indole-3-acetic acid (IAA, a type of auxin). This direct accumulation has been shown to be responsible for gall formation in oleander knot disease. Some key papers: Palm et al. 1989, link 1; Glickman et al. 1998, link 2.

Chemical induction of transport: Root-knot nematode worms induce root gall formation in clover. They probably do so by producing flavonoids which up-regulate transportation of auxin into cells (see link 3).

Genetic induction: As already mentioned by Amy, Agrobacterium tumefaciens is a very well characterised example of induction by genetic modification, however, A. tumefaciens is also known to directly produce auxins in large quantities. Another interesting example of genetic modification is in viral gall-inducers. They are not so well studied as their bacterial counterparts, but in some cases (e.g. white clover mosaic potexvirus) it has been shown that virus infection initially leads to a complex change in the types of cytokinins produced by the plant (e.g. Clarke, 1999; see link 4). It has also been shown that if cytokinins are applied exogenously (i.e. injected into the plant) after viral infection, that the virus cannot replicate well. This suggests that the virus is manipulating the host's hormone production in a complex way.

There is also the interesting case of Rhodococcus fascians, which seems to produce a chemical which is not structurally similar to any known cytokinin, and yet has similar effects (Goethals et al., 2001; link 5).

You specifically asked about gall wasps, but unfortunately this mechanism is, as far as I can tell, not completely known. It is speculated (e.g. in Shorthouse &amp; Rohrfritsch, 1992; link 6) that this involves direct injection of phytohormones. The evidence to support this is simply that other insects, particularly aphids, excrete phytohormones in their salivary sheaths when they inject them into a plant.

Finally, I'll just say that the fact that gall induction is carried out by bacteria, viruses, nematodes, fungi and wasps, and that some mechanisms are shared across all those associations,  demonstrates the ability of evolution to converge on the most elegant solution to a problem. It also shows that plants are so great, everyone wants a piece (but I would say that, because I'm a plant biologist).

References:


http://www.ncbi.nlm.nih.gov/pmc/articles/PMC209694/
http://apsjournals.apsnet.org/doi/abs/10.1094/MPMI.1998.11.2.156
http://www.publish.csiro.au/?paper=PP98157
http://www.plantphysiol.org/content/120/2/547.full
http://www.annualreviews.org/doi/full/10.1146/annurev.phyto.39.1.27
http://www.nhbs.com/biology_of_insect_induced_galls_tefno_3838.html