There is increasing evidence that the diet and nutritional status of women during pregnancy and lactation can modulate the microbiota of their milk and, therefore, the microbiota of the infant. An observational, descriptive, and cross-sectional study was carried out in a group of lactating women. Dietary intake during gestation and the first trimester of lactation was evaluated, and the microbiota was analyzed by 16S ribosomal RNA (rRNA) sequencing using the Illumina platform. Globally, Streptococcus spp. (32%), Staphylococcus spp. (17.3%), Corynebacterium spp. (5.1%) and Veillonella spp. (3.1%) were the predominant bacterial genera. The consumption of simple carbohydrates in gestation (rho = 0.55, p ≤ 0.01) and lactation (rho = 0.50, p ≤ 0.01) were positively correlated with Enterobacter spp. In lactation, a negative correlation was observed between the intake of simple carbohydrates and the genus Bifidobacterium spp. (rho = −0.51 p ≤ 0.01); furthermore, a positive correlation was identified between the intake of folic acid and Akkermansia spp. (rho = 0.47, p ≤ 0.01). Amplicon sequence variants (ASVs) associated with the delivery mode, employment relationship, the baby’s gender, birth weight, the Body Mass Index (BMI) of the breastfeeding woman, and gestational weight gain were recovered as covariates in a linear mixed model. The results of this research showed that the maternal nutritional status and diet of women during gestation and lactation could modulate the microbiota of breast milk.