Glycosylation is a key modification of proteins and lipids and is involved in most intermolecular and intercellular interactions. The gastrointestinal mucus gel is continuous and can be divided into two layers: a secreted loosely associated layer and a layer firmly attached to the mucosa. In addition, the membrane-bound glycosylated proteins and lipids create a glycocalyx, which remains adherent on each cell and is dynamic and responsive to the physiological state and environment of the cell. The secreted glycans form a mucus gel layer that serves as a physicochemical sensor and barrier network and is primarily composed of mucins and associated peptides. These glycans protect gut epithelial cells from chemical, biological and physical insults and are continuously renewed. Pathogens colonise and invade the host epithelial cells using protein-protein and glycan-lectin interactions. During the process of colonisation and infection, the glycosylation state of both host and pathogen change in response to the presence of the other. This complex modulation of glycan expression critically determines pathogenesis and the host response in terms of structural changes and immune response. In addition, by influencing host immunity and gut glycosylation, the microbiota can further effect protection against pathogens. In this review, the roles of host glycosylation in interactions with two prevalent bacterial pathogens, Campylobater jejuni and Helicobacter pylori, are discussed to illustrate important concepts in pathogenesis.