Gall midges (Cecidomyiidae) constitute one of the largest and most diverse families of Diptera, with close to 6600 described species and thousands of undescribed species worldwide. The family includes fungus-feeders as well as herbivorous and predatory species but the evolution of these feeding modes has not been clarified until recently. In a first comprehensive phylogenetic analysis of the gall midges we sampled 142 species representing 88 genera from all feeding guilds and zoogeographic regions in the family in order to gain insight into patterns of diversification within it. We used sequences from five mitochondrial and nuclear genes to reconstruct time-calibrated phylogenies and conducted ancestral state reconstruction of feeding guilds. Our results provide strong support for all tribes, which have all been established in the Upper Cretaceous concordant with the major radiation of angiosperms. We show that the transition from fungus-feeding to plant-feeding occurred only once or twice in the evolution of the gall midges and has led to explosive speciation in the herbivorous clades. Currently available data do not support the hypothesis that herbivorous clades associated with symbiotic fungi in the galls diversify at a faster rate or have broader host-plant ranges than non-symbiotic clades.