The composition and functioning of the gut microbiota, the complex population of microorganisms residing in the intestine, is strongly affected by endogenous and exogenous factors, among which diet is key. Important perturbations of the microbiota have been observed to contribute to disease risk, as in the case of neurological disorders, inflammatory bowel disease, obesity, diabetes, cardiovascular disease, among others. Although mechanisms are not fully clarified, nutrients interacting with the microbiota are thought to affect host metabolism, immune response or disrupt the protective functions of the intestinal barrier. Similarly, key intermediaries, whose presence may be strongly influenced by dietary habits, sustain the communication along the gut-brain-axis, influencing brain functions in the same way as the brain influences gut activity. Due to the role of diet in the modulation of the microbiota, its composition is of high interest in inherited errors of metabolism (IEMs) and may reveal an appealing therapeutic target. In IEMs, for example in phenylketonuria (PKU), since part of the therapeutic intervention is based on chronic or life-long tailored dietetic regimens, important variations of the microbial diversity or relative abundance have been observed. A holistic approach, including a healthy composition of the microbiota, is recommended to modulate host metabolism and affected neurological functions.