Background: The digestive tract of many metazoan invertebrates is characterized by the presence of caeca or diverticula that serve secretory and/or absorptive functions. With the development of various feeding habits, distinctive digestive organs may be present in certain taxa. This also holds true for sea urchins (Echinodermata: Echinoidea), in which a highly specialized gastric caecum can be found in members of a derived subgroup, the Irregularia (cake urchins, sea biscuits, sand dollars, heart urchins, and related forms). As such a specialized caecum has not been reported from "regular" sea urchin taxa, the aim of this study was to elucidate its evolutionary origin. Results: Using morphological data derived from dissection, magnetic resonance imaging, and extensive literature studies, we compare the digestive tract of 168 echinoid species belonging to 51 extant families. Based on a number of characters such as topography, general morphology, mesenterial suspension, and integration into the haemal system, we homologize the gastric caecum with the more or less pronounced dilation of the anterior stomach that is observed in most "regular" sea urchin taxa. In the Irregularia, a gastric caecum can be found in all taxa except in the Laganina and Scutellina. It is also undeveloped in certain spatangoid species. Conclusions: According to our findings, the sea urchin gastric caecum most likely constitutes a synapomorphy of the Euechinoidea. Its occurrence in "regular" euechinoids is linked to the presence of an additional festoon of the anterior stomach in ambulacrum III. Both structures, the additional festoon and the gastric caecum, are absent in the sister taxon to the Euechinoidea, the Cidaroida. Since the degree of specialization of the gastric caecum is most pronounced in the predominantly sediment-burrowing irregular taxa, we hypothesize that its evolution is closely linked to the development of more elaborate infaunal lifestyles. We provide a comprehensive study of the origin and evolutionary plasticity of a conspicuous digestive tract structure, the gastric caecum, in a major taxon of the extant invertebrate macrozoobenthos.