The host's physiological well-being is intricately associated with the gut microbiota. However, previous studies regarding the intestinal microbiota have focused on domesticated or captive birds. This study used high-throughput sequencing technology to identify the gut bacterial communities of sympatric bean geese, hooded cranes, and domestic geese. The results indicated that the gut bacterial diversity in domestic geese and hooded cranes showed considerably higher diversity than bean geese. The gut bacterial community compositions varied significantly among the three hosts (p < 0.05). Compared to the hooded crane, the bean goose and domestic goose were more similar in their genotype and evolutionary history, with less difference in the bacterial community composition and assembly processes between the two species. Thus, the results might support the crucial role of host genotypes on their gut microbiota. The gut bacteria of wild hooded cranes and bean geese had a greater capacity for energy metabolism compared to domestic geese, suggesting that wild birds may rely more on their gut microbiota to survive in cold conditions. Moreover, the intestines of the three hosts were identified as harboring potential pathogens. The relative abundance of pathogens was higher in the hooded crane compared to the other two species. The hooded crane gut bacterial community assemblage revealed the least deterministic process with the lowest filtering/selection on the gut microbiota, which might have been a reason for the highest number of pathogens result. Compared to the hooded crane, the sympatric bean goose showed the least diversity and relative abundance of pathogens. The intestinal bacterial co-occurrence network showed the highest stability in the bean goose, potentially enhancing host resistance to adverse environments and reducing the susceptibility to pathogen invasion. In this study, the pathogens were also discovered to overlap among the three hosts, reminding us to monitor the potential for pathogen transmission between poultry and wild birds. Overall, the current findings have the potential to enhance the understanding of gut bacterial and pathogenic community structures in poultry and wild birds.