Conservation efforts tend to focus on populations that are genetically differentiated without paying attention to their ecological differentiation. However, isolated populations may be ecologically unique, an important aspect for the design of appropriate conservation measures for endangered species. Here we investigate the interplay between diet and gut microbiome in several geographically isolated and genetically differentiated populations of the critically endangered Grauer's gorilla. We find that dietary and gut microbial profiles are population-specific, likely due to geographic isolation and environmental differences. In addition, social groups within each population also differed in diet and, to a lesser extent, in gut microbial composition and diversity. Individuals at low elevation consumed a larger variety of plant taxa than those at high elevation, consistent with the notion that dietary choice is constrained by food availability that changes with elevation. Despite no detectable correlation between the diet and gut microbiome in richness or evenness, dietary and gut microbial composition covaried significantly. As we did not find evidence for an effect of genetic relatedness on the composition of the gut microbiome of Grauer's gorillas, this pattern is likely a result of long-term social, ecological, and geographic factors acting on both diet and microbiome. These results reveal that isolated and genetically distinct populations of Grauer's gorillas are also ecologically distinct, highlighting the need to dedicate separate conservation efforts for each population.