Currently, sepsis remains a global burden that causes high morbidity and mortality rates worldwide. The incidence of sepsis has been increasing lately, particularly among vulnerable groups of children, especially neonates. This poses a significant challenge, particularly for preterm infants. The gut plays an important role in human health and development, with the gut microbiome being one of the most substantial factors. The development of gut microbiota is crucial for children's growth, starting from the intrauterine phase, during delivery, and after birth. Many factors influence changes in gut microbiota, including maternal and neonatal factors. These changes can trigger dysbiosis, which may subsequently lead to sepsis and increased mortality. This review explores the development of gut microbiota from the intrauterine phase to the neonatal period and its relationship with the occurrence of neonatal sepsis.