This review aims to explore the potential role of folate and related B vitamins (B12, B6 and riboflavin) in maintaining cognitive health in ageing, focusing particularly on their interactions with the gut microbiota and inflammation. Low B-vitamin status, common in older adults, is associated with poorer cognitive function and dementia. Furthermore, people with dementia are observed to have increased abundance of pro-inflammatory microbes and concomitant higher concentrations of cytokines in their circulation. Therefore, gut dysbiosis and chronic inflammation have been proposed as contributors of cognitive dysfunction. Although many observational studies report that low B-vitamin status, especially vitamin B6, is associated with a worse inflammatory state, the role of the gut microbiota is much less investigated. Pre-clinical evidence suggests higher B-vitamin intakes may beneficially modulate the gut bacterial profile and its metabolic activity, positively influencing inflammation. The evidence, however, is inconsistent, and the few human intervention studies available are confined to clinical populations or are limited by small sample size or to a single B-vitamin at high supplementation doses. Of note, one study in rats with Alzheimer’s-type dementia reported an association of folate and vitamin B12 deficiency with disturbed gut bacterial composition, neuroinflammation and impaired memory. In conclusion, optimising B-vitamin status may help promote cognitive health during ageing through modulation of the gut microbiota and immune function. Well-designed human studies are, however, required to confirm these relationships and inform evidence-based nutritional strategies for healthy ageing.