The endoderm is the innermost layer of cells of a eukaryote or the innermost layer of cells in the developing embryo once it has reached the gastrula stage. This cell layer ultimately gives rise to the inner (epithelial) linings of the gut and associated glands, liver, respiratory tract, urinary bladder, ear passages, and the functional portions of the thyroid, parathyroid, pancreas, and thymus.