Inflammatory bowel disease (IBD) is an idiopathic inflammatory disease characterized by chronic and relapsing manifestations. It is noteworthy that the prevalence of IBD is gradually increasing in both children and adults. Currently, the pathogenesis of IBD remains to be completely elucidated. IBD is believed to occur through interactions among genetics, environmental factors, and the gut microbiota. However, the relapsing and remitting course of IBD underlines the importance of other modifiers, such as psychological stress. Growing evidence from clinical and experimental studies suggests that stress acts as a promoting or relapsing factor for IBD. Importantly, recent studies have reported an increasing incidence of anxiety or depression in both children and adults with IBD. In this article, we review the mechanisms by which stress affects IBD, such as via impaired intestinal barrier function, disturbance of the gut microbiota, intestinal dysmotility, and immune and neuroendocrine dysfunction. With regard to both children and adults, we provide recent evidence to describe how stress can affect IBD at various stages. Furthermore, we emphasize the importance of mental healing and discuss the value of approaches targeting stress in clinical management to develop enhanced strategies for the prevention and treatment of IBD.