Background: The gut microbiome in infancy influences immune system maturation, and may have an important impact on allergic disease risk. Objective: We sought to determine how prenatal and early life factors impact the gut microbiome in a relatively large, ethnically diverse study population of infants at age 3 to 6 months, who were enrolled in Vitamin D Antenatal Asthma Reduction Trial, a clinical trial of vitamin D supplementation in pregnancy to prevent asthma and allergies in offspring. Methods: We performed 16S rRNA gene sequencing on 333 infants' stool samples. Microbial diversity was computed using the Shannon index. Factor analysis applied to the top 25 most abundant taxa revealed 4 underlying bacterial coabundance groups; the first dominated by Firmicutes (Lachnospiraceae/ Clostridiales), the second by Proteobacteria (Klebsiella/ Enterobacter), the third by Bacteriodetes, and the fourth by Veillonella. Scores for coabundance groups were used as outcomes in regression models, with prenatal/birth and demographic characteristics as independent predictors. Multivariate analysis, using all microbial community members, was also conducted. Results: White race/ethnicity was associated with lower diversity but higher Bacteroidetes coabundance scores. C-section birth was associated with higher diversity, but decreased Bacteroidetes coabundance scores. Firmicutes scores were higher for infants born by C-section. Breast-fed infants had lower proportions of Clostridiales. Cord blood vitamin D was linked to increased Lachnobacterium, but decreased Lactococcus. Conclusions: The findings presented here suggest that race, mode of delivery, breast-feeding, and cord blood vitamin D levels are associated with infant gut microbiome composition, with possible long-term implications for immune system modulation and asthma/allergic disease incidence.