Fate commitment of the germ layers along the body axes begin during gastrulation. This early fate specification forms the basis for subsequent progressive differentiation, thereby laying down the animal body plan. The mesoderm germ layer differentiation along the anterior-posterior axis, one of the earliest events of divergence, remains scarcely understood. Wnt/β-catenin signal specifies mesoderm fate on pluripotent epiblast cells of mammalian embryos. It induces the expression of T-box factors Eomes and Tbxt (Brachyury), which regulate the mesoderm gene network. Wnt signal also confers posterior identity via the activation of caudal homeobox factors, Cdx. Here, using mouse embryonic stem cell-based embryo organoids - gastruloids, we show that the Wnt signal specifies posterior mesoderm in the presence of retinoic acid (RA) signal and drives anterior mesoderm development in the absence of RA. Our findings suggest that RA impinges on the Wnt signal to diversify mesoderm. Analysis of mutant gastruloids suggest that in the absence of RA, a condition recapitulating the early gastrula, Eomes and Tbxt suppress Cdx2. In this context, Eomes specifies anterior mesoderm. When RA signal is activated, resembling the late gastrula, Cdx2 is derepressed, which then confers posterior identity to mesoderm. These findings have implications to understand the head to trunk developmental transition.