The gastrointestinal tract is innervated by several distinct populations of neurons, whose cell bodies either reside within (intrinsic) or outside (extrinsic) the gastrointestinal wall. Normally, most individuals are unaware of the continuous, complicated functions of these neurons. However, for patients with gastrointestinal disorders, such as IBD and IBS, altered gastrointestinal motility, discomfort and pain are common, debilitating symptoms. Although bouts of intestinal inflammation underlie the symptoms associated with IBD, increasing preclinical and clinical evidence indicates that infection and inflammation are also key risk factors for the development of other gastrointestinal disorders. Notably, a strong correlation exists between prior exposure to gut infection and symptom occurrence in IBS. This Review discusses the evidence for neuroplasticity (structural, synaptic or intrinsic changes that alter neuronal function) affecting gastrointestinal function. Such changes are evident during inflammation and, in many cases, long after healing of the damaged tissues, when the nervous system fails to reset back to normal. Neuroplasticity within distinct populations of neurons has a fundamental role in the aberrant motility, secretion and sensation associated with common clinical gastrointestinal disorders. To find appropriate therapeutic treatments for these disorders, the extent and time course of neuroplasticity must be fully appreciated.