Seasonal variations in gut microbiota of small mammals and how they are influenced by environmental variables are relatively poorly understood. We sampled 162 wild plateau pikas (Ochotona curzoniae) in 4 seasons over 2 and a half years and recorded the air temperature, precipitation, and nutrient content in edible vegetation at the sampling site. After conducting 16S rRNA and shotgun metagenomic sequencing, we found that the highest alpha diversity, the relative abundance of Firmicutes, and the simplest co-occurrence network occurred in winter, whereas the highest relative abundance of Proteobacteria and the most complex network structure were observed in spring. The highest relative abundance of Verrucomicrobiota and Spirochaetota was seen in summer and autumn, respectively. Air temperature, precipitation, and the contents of crude protein, crude fiber, and polysaccharide in vegetation had significant effects on the seasonal changes in gut microbiota. Diet contributed more to microbial variation than climatic factors. Metagenomic analysis revealed that the amino acid metabolism pathway and axillary activity enzymes were most abundant in summer, while abundance of carbohydrate-binding modules and carbohydrate esterases was highest in spring. These microbial variations were related to the changes in dietary nutrition, indicating that gut microbiota of plateau pika contribute to the efficient use of food resources. This study provides new evidence of how external environmental factors affect the intestinal environment of small mammals.