The intestinal tract of mammals is colonized by a large number of microorganisms including trillions of bacteria that are referred to collectively as the gut microbiota. These indigenous microorganisms have co-evolved with the host in a symbiotic relationship. In addition to metabolic benefits, symbiotic bacteria provide the host with several functions that promote immune homeostasis, immune responses, and protection against pathogen colonization. The ability of symbiotic bacteria to inhibit pathogen colonization is mediated via several mechanisms including direct killing, competition for limited nutrients, and enhancement of immune responses. Pathogens have evolved strategies to promote their replication in the presence of the gut microbiota. Perturbation of the gut microbiota structure by environmental and genetic factors increases the risk of pathogen infection, promotes the overgrowth of harmful pathobionts, and the development of inflammatory disease. Understanding the interaction of the microbiota with pathogens and the immune system will provide critical insight into the pathogenesis of disease and the development of strategies to prevent and treat inflammatory disease.