Intestinal microbiota can influence the phenotype and function of immune cell responses through the dissemination of bacterial antigens or metabolites. Diet is one of the major forces shaping the microbiota composition and metabolism, contributing to host homeostasis and disease susceptibility. Currently, nutrition is a complementary and alternative approach to the management of metabolic and neurological diseases and cancer. However, the knowledge of the exact mechanism of action of diet and microbiota on the gut–brain communication is only developing in recent years. Here, we reviewed the current knowledge on the effect of diet and microbiota on the gut–brain axis in patients with two different central nervous system diseases, multiple sclerosis and stroke. We have also highlighted the open questions in the field that we believe are important to address to gain a deeper understanding of the mechanisms by which diet can directly or indirectly affect the host via the microbiota. We think this will open up new approaches to the treatment, diagnosis, and monitoring of various diseases.