Research on the gut microbiota of free-ranging mammals is offering new insights into dietary ecology. However, for free-ranging primates, little information is available for how microbiomes are influenced by ecological variation through time. Primates inhabiting seasonal tropical dry forests undergo seasonally specific decreases in food abundance and water availability, which have been linked to adverse health effects. Throughout the course of a seasonal transition in 2014, we collected fecal samples from three social groups of free-ranging white-faced capuchin monkeys (Cebus capucinus imitator) in Sector Santa Rosa, Área de Conservación Guanacaste, Costa Rica. 16S rRNA sequencing data reveal that unlike other primates, the white-faced capuchin monkey gut is dominated by Bifidobacterium and Streptococcus. Linear mixed effects models indicate that abundances of these genera are associated with fluctuating availability and consumption of fruit and arthropods, whereas beta diversity clusters by rainfall season. Whole shotgun metagenomics revealed that the capuchin gut is dominated by carbohydrate-binding modules associated with digestion of plant polysaccharides and chitin, matching seasonal dietary patterns. We conclude that rainfall and diet are associated with the diversity, composition, and function of the capuchin gut microbiome. Additionally, microbial fluctuations are likely contributing to nutrient uptake and the health of wild primate populations.