Several behavioural effects of prenatal stress are reported in literature, and these seem to depend, among other factors, on the gender studied and the period of gestation in which prenatal stress is applied. In the present study, oral administration of hydrocortisone-acetate (HCA) to 41 pregnant sows was used as a model for prenatal stress, since corticosteroids are considered a key mediator in the effects of prenatal stress. HCA was orally administered to pregnant sows during three periods of gestation: 21–50 (period 1, P1, n = 10), 51–80 (period 2, P2, n = 10) and 81–110 (period 3, P3, n = 10) days after insemination (term 115 days). Control sows (n = 11) received vehicle from 21 to 110 days after insemination. Between days 9 and 48 after birth, treatment effects on male and female piglet behaviour were determined in the home pen and in four different behavioural tests. During the backtest, no gender differences were observed in vocalisations in HCA-piglets, while control males vocalised more than control females. In the home pen at 14 days of age, HCA-piglets spent less time in social interactions than control piglets. During the novel environment test, P1- and P3-piglets walked more than control piglets, but this was not observed during the novel object test, four days later. At weaning, P2- and P3-piglets performed less individual play. Prior to mixing with an unfamiliar piglet (male piglets only), HCA-piglets had lower salivary cortisol concentrations than control piglets, but no difference was observed after mixing. P1-, P2-, and P3- piglets had fewer non-aggressive encounters, and P2-piglets continued fighting longer than control piglets. The present study demonstrates that elevated maternal cortisol concentrations during gestation affect piglet behaviour, and effects do differ between male and female piglets. In addition, effects depend on the period of cortisol administration.