The diet–microbiota–metabolism relationships during pregnancy are mostly unknown. We explored the effect of the habitual diet and adherence to the dietary reference values on gut microbiota composition and diversity. Further, the association of gut microbiota with serum lipidomics and low-grade inflammation was evaluated. Overweight and obese women (BMI 30·7 (sd 4·4) kg/m2, n 100) were studied at early pregnancy (≤17 weeks). Intakes of nutrients were calculated from 3-d food diaries. Faecal microbiota composition was analysed using 16S rRNA gene sequencing. Fasting serum lipidomic profiles were determined by NMR. High-sensitivity C-reactive protein, glycoprotein acetylation (GlycA) and lipopolysaccharide activity were used as markers for low-grade inflammation. The recommended dietary intake of fibre and fat was related to higher gut microbiota richness and lower abundance of Bacteroidaceae. Correlations were observed between gut microbiota richness and GlycA and between a few microbiota genera and serum lipoprotein particles. As a conclusion, adherence to the dietary reference intake of fat and fibre was associated with beneficial gut microbiota composition, which again contributed to lipidomic profile. Higher gut microbiota richness and nutrient intakes were linked to a lower level of low-grade inflammation marker GlycA. This finding offers novel insights and opportunities for dietary modification during pregnancy with potential of improving the health of the mother and the child.