Hemichordate worms possess ciliated gills on their trunk, and the homology of these structures with the pharyngeal gill slits of chordates has long been a topic of debate in the fields of evolutionary biology and comparative anatomy. Here, we show conservation of transcription factor expression between the developing pharyngeal gill pores of the hemichordate Saccoglossus kowalevskii and the pharyngeal gill slit precursors (i.e. pharyngeal endodermal outpockets) of vertebrates. Transcription factors that are expressed in the pharyngeal endoderm, ectoderm and mesenchyme of vertebrates are expressed exclusively in the pharyngeal endoderm of S. kowalevskii. The pharyngeal arches and tongue bars of S. kowalevskii lack Tbx1-expressing mesoderm, and are supported solely by an acellular collagenous endoskeleton and by compartments of the trunk coelom. Our findings suggest that hemichordate and vertebrate gills are homologous as simple endodermal outpockets from the foregut, and that much vertebrate pharyngeal complexity arose coincident with the incorporation of cranial paraxial mesoderm and neural crest-derived mesenchyme within pharyngeal arches along the chordate and vertebrate stems, respectively.