
The start of gastrulation in week 3 is marked by the appearance of a midline structure, a depression, on the epiblast called the primitive streak, shown schematically here.
Cells from the epiblast invade this depression, and migrate into the hypoblast, displacing the cells here entirely, and forming a new layer of cells: the definitive endoderm (or secondary endoderm).
Other cells from the epiblast then migrate between the endoderm and epiblast and form a third germ layer - the intraembryonic mesoderm.
This invasion of the epiplast cells into the space between the epiblast and hypoblast is called gastrulation.
The process of gastrulation converts the bilaminar germ disc into a trilaminar germ disc.
The epiblast is now known as the ectoderm.
Thus, the ectoderm, mesoderm and definitive endoderm are all derived from the epiblast.
Cells remaining in the epiblast, when gastrulation is finished, give rise either to surface ectoderm, or to the neurectoderm of the neural plate.