Introduction The functional consequences of the bacterial gut microbiome for child health are not well understood. Characteristics of the early child gut microbiome may influence the course of enteric infections, and enteric infections may change the composition of the gut microbiome, all of which may have long-term implications for child growth and development.Methods and analysis We are conducting a community-based birth cohort study to examine interactions between gut microbiome conditions and enteric infections, and how environmental conditions affect the development of the gut microbiome. We will follow 360 newborns from 3 sites along a rural–urban gradient in northern coastal Ecuador, characterising enteric infections and gut microbial communities in the children every 3 to 6 months over their first 2 years of life. We will use longitudinal regression models to assess the correlation between environmental conditions and gut microbiome diversity and presence of specific taxa, controlling for factors that are known to be associated with the gut microbiome, such as diet. From 6 to 12 months of age, we will collect weekly stool samples to compare microbiome conditions in diarrhoea stools versus stools from healthy children prior to, during and after acute enteric infections, using principal-coordinate analysis and other multivariate statistical methods.Ethics and dissemination Ethics approvals have been obtained from Emory University and the Universidad San Francisco de Quito institutional review boards. The findings will be disseminated through conference presentations and peer-reviewed journals.