Ruminococcus gnavus is a human gut symbiont which ability to degrade mucins is mediated by an intramolecular trans-sialidase (RgNanH). RgNanH comprises a GH33 catalytic domain and a sialic acid binding carbohydrate binding module (CBM40). Here we used glycan arrays, STD NMR, X-ray crystallography, mutagenesis, and binding assays to determine the structure and function of RgNanH_CBM40 (RgCBM40). RgCBM40 displays the canonical CBM40 b-sandwich fold and broad specificity towards sialoglycans with millimolar binding affinity towards α2,3- or α2,6-sialyllactose. RgCBM40 binds to mucus produced by goblet cells and to purified mucins, providing direct evidence for a CBM40 as a novel bacterial mucus adhesin. Bioinformatics data show that RgCBM40 canonical type domains are widespread among Firmicutes. Furthermore, binding of R. gnavus ATCC 29149 to intestinal mucus is sialic acid mediated. Together, this study reveals novel features of CBMs which may contribute to the biogeography of symbiotic bacteria in the gut.