The mosquito gut represents an ecosystem that accommodates a complex, intimately associated microbiome. It is increasingly clear that the gut microbiome influences a wide variety of host traits, such as fitness and immunity. Understanding the microbial community structure and its dynamics across mosquito life is a prerequisite for comprehending the symbiotic relationship between the mosquito and its gut microbial residents. Here we characterized gut bacterial communities across larvae, pupae and adults of Anopheles gambiae reared in semi-natural habitats in Kenya by pyrosequencing bacterial 16S rRNA fragments. Immatures and adults showed distinctive gut community structures. Photosynthetic Cyanobacteria were predominant in the larval and pupal guts while Proteobacteria and Bacteroidetes dominated the adult guts, with core taxa of Enterobacteriaceae and Flavobacteriaceae. At the adult stage, diet regime (sugar meal and blood meal) significantly affects the microbial structure. Intriguingly, blood meals drastically reduced the community diversity and favored enteric bacteria. Comparative genomic analysis revealed that the enriched enteric bacteria possess large genetic redox capacity of coping with oxidative and nitrosative stresses that are associated with the catabolism of blood meal, suggesting a beneficial role in maintaining gut redox homeostasis. Interestingly, gut community structure was similar in the adult stage between the field and laboratory mosquitoes, indicating that mosquito gut is a selective eco-environment for its microbiome. This comprehensive gut metatgenomic profile suggests a concerted symbiotic genetic association between gut inhabitants and host.