The lifelong health of an individual is shaped during critical periods of development. The fetus is particularly susceptible to internal and external stimuli, many of which can alter developmental trajectories and subsequent susceptibility to disease. Glucocorticoids are critical in normal development of the fetus, as they are involved in the growth and maturation of many organ systems. The surge in fetal glucocorticoid levels that occurs in most mammalian species over the last few days of pregnancy is an important developmental switch leading to fundamental changes in gene regulation in many organs, including the brain. These changes are important for the transition to postnatal life. Exposure of the fetus to increased levels of glucocorticoids, resulting from maternal stress or treatment with synthetic glucocorticoids, can lead to long-term ‘programming’ of hypothalamic-pituitary-adrenal function and behaviours. Glucocorticoids act at multiple levels within the fetal brain. Growing evidence indicates that they can exert powerful effects on the epigenome, including on DNA methylation, histone acetylation and microRNA, to influence gene expression. Such influences probably represent a critical component of the ‘programming’ process, and might be partly responsible for the transgenerational effects of antenatal glucocorticoid exposure on neurologic, cardiovascular and metabolic function.