The origin of marine invertebrate larvae has been an area of controversy in developmental evolution for over a century. Here, we address the question of whether a pelagic "larval" or benthic "adult" morphology originated first in metazoan lineages by testing the hypothesis that particular gene co-option patterns will be associated with the origin of feeding, indirect developing larval forms. Empirical evidence bearing on this hypothesis is derivable from gene expression studies of the sea urchin larval gut of two closely related but differently developing congenerics, Heliocidaris tuberculata (feeding indirect-developing larva) and H. erythrogramma (nonfeeding direct developer), given two subsidiary hypotheses. (1) If larval gut gene expression in H. tuberculata was co-opted from an ancestral adult expression pattern, then the gut expression pattern will remain in adult H. erythrogramma despite its direct development. (2) Genes expressed in the larval gut of H. tuberculata will not have a coordinated expression pattern in H. erythrogramma larvae due to loss of a functional gut. Five structural genes expressed in the invaginating archenteron of H. tuberculata during gastrulation exhibit substantially different expression patterns in H. erythrogramma with only one remaining endoderm specific. Expression of these genes in the adult of H. erythrogramma and larval gut of H. tuberculata, but not in H. erythrogramma larval endoderm, supports the hypothesis that they first played roles in the formation of adult structures and were subsequently recruited into larval ontogeny during the origin and evolution of feeding planktotrophic deuterostome larvae.