The effects of gut microbiota on the association between carbohydrate intake during pregnancy and neonatal low birth weight (LBW) were investigated. A prospective cohort study was conducted with 257 singleton-born mother–child pairs in Taiwan, and maternal dietary intake was estimated using a questionnaire, with each macronutrient being classified as low, medium, or high. Maternal fecal samples were collected between 24 and 28 weeks of gestation, and gut microbiota composition and diversity were profiled using 16S rRNA amplicon gene sequencing. Carbohydrates were the major source of total energy (56.61%), followed by fat (27.92%) and protein (15.46%). The rate of infant LBW was 7.8%, which was positively correlated with maternal carbohydrate intake. In the pregnancy gut microbiota, Bacteroides ovatus and Dorea spp. were indirectly and directly negatively associated with fetal growth, respectively; Rosenburia faecis was directly positively associated with neonatal birth weight. Maternal hypertension during pregnancy altered the microbiota features and was associated with poor fetal growth. Microbiota-accessible carbohydrates can modify the composition and function of the pregnancy gut microbiota, thus providing a potential marker to modulate deviations from dietary patterns, particularly in women at risk of hypertension during pregnancy, to prevent neonatal LBW.