The animal gut is a habitat for diverse communities of microorganisms (microbiota). Honeybees and bumblebees have recently been shown to harbour a distinct and species poor microbiota, which may confer protection against parasites. Here, we investigate diversity, host specificity and transmission mode of two of the most common, yet poorly known, gut bacteria of honeybees and bumblebees: Snodgrassella alvi (Betaproteobacteria) and Gilliamella apicola (Gammaproteobacteria). We analysed 16S rRNA gene sequences of these bacteria from diverse bee host species across most of the honeybee and bumblebee phylogenetic diversity from North America, Europe and Asia. These focal bacteria were present in 92% of bumblebee species and all honeybee species but were found to be absent in the two related corbiculate bee tribes, the stingless bees (Meliponini) and orchid bees (Euglossini). Both Snodgrassella alvi and Gilliamella apicola phylogenies show significant topological congruence with the phylogeny of their bee hosts, albeit with a considerable degree of putative host switches. Furthermore, we found that phylogenetic distances between Gilliamella apicola samples correlated with the geographical distance between sampling locations. This tentatively suggests that the environmental transmission rate, as set by geographical distance, affects the distribution of G. apicola infections. We show experimentally that both bacterial taxa can be vertically transmitted from the mother colony to daughter queens, and social contact with nest mates after emergence from the pupa greatly facilitates this transmission. Therefore, sociality may play an important role in vertical transmission and opens up the potential for co-evolution or at least a close association of gut bacteria with their hosts.