The gut microbiota is known to play an important role in maintaining gut health through a symbiotic relationship with the host. Altered gut microbiota is a common feature of several diseases of the gastrointestinal tract; however, the causal relationship between microbiota and disease pathogenesis is poorly understood. Necrotising enterocolitis (NEC) and inflammatory bowel disease (IBD) are both severe inflammatory diseases affecting the gastrointestinal tract. Although they affect very different patient populations, with NEC primarily being a disease of prematurity and IBD predominantly affecting adults although children can be affected, they both demonstrate common features of gut microbial dysbiosis and a dysregulated host immune response. By comparing and contrasting the changes in gut microbiota, host immune response and function, we aim to highlight common features in diseases that may seem clinically unrelated. Key areas of interest are the role of pattern recognition receptors in altered recognition and responses to the gut microbiota by the host immune system and the associated dysfunctional gut epithelial barrier. The challenge of identifying causal relationships between microbiota and disease is ever-present; however, considering a disease-agnostic approach may help to identify mechanistic pathways shared across several clinical diseases.