The intestinal epithelium is in direct contact with a vast microbiota, yet little is known about how epithelial cells defend the host against the heavy bacterial load. To address this question we studied Paneth cells, a key small intestinal epithelial lineage. We found that Paneth cells directly sense enteric bacteria through cell-autonomous MyD88-dependent toll-like receptor (TLR) activation, triggering expression of multiple antimicrobial factors. Paneth cells were essential for controlling intestinal barrier penetration by commensal and pathogenic bacteria. Furthermore, Paneth cell-intrinsic MyD88 signaling limited bacterial penetration of host tissues, revealing a role for epithelial MyD88 in maintaining intestinal homeostasis. Our findings establish that gut epithelia actively sense enteric bacteria and play an essential role in maintaining host-microbial homeostasis at the mucosal interface.