The gastrointestinal tract (GIT) arises initially during the process of gastrulation from the endoderm of the trilaminar embryo (week 3) and extends from the buccopharyngeal membrane to the cloacal membrane. The tract and associated organs later have contributions from all the germ cell layers.
During the 4th week three distinct regions (fore-, mid- and hind-gut) extend the length of the embryo and will contribute different components of the GIT. The large mid-gut is generated by lateral embryonic folding which "pinches off" a pocket of the yolk sac, the 2 compartments continue to communicate through the vitelline duct.
The oral cavity (mouth) is formed following breakdown of the buccopharyngeal membrane (oropharyngeal or oral membrane) and contributed to mainly by the pharynx lying within the pharyngeal arches (More? Head Development). Loss of buccopharyngeal membrane opens the tract to amniotic fluid through the remainder of development, and during the fetal period is actively swallowed.