Anorexia nervosa (AN) is characterised by the restriction of energy intake in relation to energy needs and a significantly lowered body weight than normally expected, coupled with an intense fear of gaining weight. Treatment of AN is currently based on psychological and refeeding approaches, but their efficacy remains limited since 40% of patients after 10 years of medical care still present symptoms of AN. The intestine hosts a large community of microorganisms, called the “microbiota”, which live in symbiosis with the human host. The gut microbiota of a healthy human is dominated by bacteria from two phyla: Firmicutes and, majorly, Bacteroidetes. However, the proportion in their representation differs on an individual basis and depends on many external factors including medical treatment, geographical location and hereditary, immunological and lifestyle factors. Drastic changes in dietary intake may profoundly impact the composition of the gut microbiota, and the resulting dysbiosis may play a part in the onset and/or maintenance of comorbidities associated with AN, such as gastrointestinal disorders, anxiety and depression, as well as appetite dysregulation. Furthermore, studies have reported the presence of atypical intestinal microbial composition in patients with AN compared with healthy normal-weight controls. This review addresses the current knowledge about the role of the gut microbiota in the pathogenesis and treatment of AN. The review also focuses on the bidirectional interaction between the gastrointestinal tract and the central nervous system (microbiota–gut–brain axis), considering the potential use of the gut microbiota manipulation in the prevention and treatment of AN.