The human gastrointestinal tract is colonized by multitudes of microorganisms that exert beneficial effects on human health. Mounting evidence suggests that intestinal microbiota contributes to host resistance against enteropathogenic bacterial infection. However, molecular details that account for such an important role has just begun to be understood. The commensal microbes in the intestine regulate gut homeostasis through activating the development of host innate immunity and producing molecules with antimicrobial activities that directly inhibit propagation of pathogenic bacteria. Understanding the protective roles of gut microbiota will provide a better insight into the molecular basis that underlies complicated interaction among host-pathogen-symbiont. In this review, we highlighted recent findings that help us broaden our knowledge of the intestinal ecosystem and thereby come up with a better strategy for combating enteropathogenic infection.