The formation of the endoderm during gastrulation. [ GOC:go_curators ]