The gut microbiota undergoes rapid and vital changes to microbial community structure and the microbial-immune crosstalk during the first 3 years of life, which is thought to be involved in the pathobiology of later-life disease. Compared to single-born children, little is known about the gut microbiota of twins in early childhood. Based on the Wuhan Twin Birth Cohort study, 344 stool samples from 204 twin families were analyzed to investigate the difference in gut microbiota composition at 6, 12, and 24 months of age. Furthermore, this study evaluated the association between gut microbiota development curves and body mass index z-score (BMI_Z) curves at 6, 12, and 24 months of age. The predominant microbiota phyla identified in twins were Proteobacteria, Actinobacteriota, Firmicutes, Bacteroidota, and Verrucomicrobiota. The richness and diversity of gut microbiota increased from 6 to 24 months old (alpha diversity with p < 0.05). Beta diversity revealed 61 gut microbiota genera that were significantly different in relative abundance among the three age groups. Among the 61 gut microbiota genera, 30 distinct trajectory curves (DTCs) were generated by group-based trajectory models after log2 transformation of their relative abundance. Subsequently, Spearman correlation analysis revealed that only five gut microbiota DTC were correlated with the BMI_Z DTC. Therefore, we further examined the association between the five gut microbiota genera DTC and BMI_Z DTC using generalized estimation equation models. The results revealed a significant association between the DTC groups of Parabacteroides and that of BMI_Z (coefficient = 0.75, p = 0.04). The results of this study validated the hypothesis that the richness and diversity of gut microbiota developed with age in twins. Moreover, participants with a higher DTC of log2-transformed Parabacteroides had a higher BMI_Z DTC during the first 2 years of life. Further studies are needed to confirm the association between Parabacteroides and BMI_Z in other populations.