Dietary, microbial, and inflammatory factors modulate the gut-brain axis and influence physiological processes ranging from metabolism to cognition. The gut epithelium is a principal site for detecting such agents, but precisely how it communicates with neural elements is poorly understood. Serotonergic enterochromaffin (EC) cells are proposed to fulfill this role by acting as chemosensors, but understanding how these rare and unique cell types transduce chemosensory information to the nervous system has been hampered by their paucity and inaccessibility to single-cell measurements. Here, we circumvent this limitation by exploiting cultured intestinal organoids together with single-cell measurements to elucidate intrinsic biophysical, pharmacological, and genetic properties of EC cells. We show that EC cells express specific chemosensory receptors, are electrically excitable, and modulate serotonin-sensitive primary afferent nerve fibers via synaptic connections, enabling them to detect and transduce environmental, metabolic, and homeostatic information from the gut directly to the nervous system.