Alterations of the gut microbiota have been associated with stress-related disorders including depression and anxiety and irritable bowel syndrome (IBS). More recently, researchers have started investigating the implication of perturbation of the microbiota composition in neurodevelopmental disorders including autism spectrum disorders and Attention-Deficit Hypersensitivity Disorder (ADHD). In this review we will discuss how the microbiota is established and its functions in maintaining health. We also summarize both pre and post-natal factors that shape the developing neonatal microbiota and how they may impact on health outcomes with relevance to disorders of the central nervous system. Finally, we discuss potential therapeutic approaches based on the manipulation of the gut bacterial composition.