Although sex biases in disease presentation are well documented, the mechanisms mediating vulnerability or resilience to diseases are unknown. In utero insults are more likely to produce detrimental health outcomes for males versus females. In our mouse model of prenatal stress, male offspring experience long-term dysregulation of body weight and hypothalamic pituitary adrenal stress axis dysfunction, endophenotypes of male-biased neurodevelopmental disorders. Placental function is critical for healthy fetal development, and we previously showed that sex differences in placental O-linked N-acetylglucosamine transferase (OGT) mediate the effects of prenatal stress on neurodevelopmental programming. Here we show that one mechanism whereby sex differences in OGT confer variation in vulnerability to prenatal insults is by establishing sex-specific trophoblast gene expression patterns and via regulation of the canonically repressive epigenetic modification, H3K27me3. We demonstrate that high levels of H3K27me3 in the female placenta create resilience to the altered hypothalamic programming associated with prenatal stress exposure.