Since gestational age (GA) is an important factor influencing the presence of specific microbiomes, we aimed to characterize the core microbiomes of preterm infants compared to full-term (FT) infants. This study investigated the differences in microbiota composition between very preterm (VP), moderate-to-late preterm (MLP), and FT neonates by examining the core microbiomes of a large cohort of Korean neonates. Meconium samples from 310 neonates with a GA range of 22-40 weeks were collected, and 16S rRNA analyses were performed; 97 samples were obtained from the FT, 59 from the VP, and 154 from the MLP group. Firmicutes, Bacteroidetes, and Proteobacteria were the phylum-level core microbiomes. Infants born before 37 weeks showed a disruption in the core microbiomes. At the phylum level, the relative abundance of Bacteroidetes was positively (r = 0.177, p = 0.002) correlated with GA, while that of Proteobacteria was negatively (r = -0.116, p = 0.040) correlated with GA. At the genus level, the relative abundances of Bacteroides and Prevotella were positively correlated with GA (r = 0.157, p = 0.006; r = 0.160, p = 0.005). The meconium of preterm infants exhibited significantly lower α-diversities than that of FT infants. β-diversities did not appear to differ between the groups. Overall, these findings underscore the importance of GA in shaping the early gut microbiome.