Natural selection should favour parents that are able to adjust their offspring's life-history strategy and resource allocation in response to changing environmental and social conditions. Pathogens impose particularly strong and variable selective pressure on host life histories, and parental genes will benefit if offspring are appropriately primed to meet the immunological challenges ahead. Here, we investigated transgenerational immune priming by examining reproductive resource allocation by female mice in response to direct infection with Babesia microti prior to pregnancy. Female mice previously infected with B. microti gained more weight over pregnancy, and spent more time nursing their offspring. These offspring generated an accelerated response to B. microti as adults, clearing the infection sooner and losing less weight as a result of infection. They also showed an altered hormonal response to novel social environments, decreasing instead of increasing testosterone production upon social housing. These results suggest that a dominance-resistance trade-off can be mediated by cues from the previous generation. We suggest that strategic maternal investment in response to an infection leads to increased disease resistance in the following generation. Offspring from previously infected mothers downregulate investment in acquisition of social dominance, which in natural systems would reduce access to mating opportunities. In doing so, however, they avoid the reduced disease resistance associated with increased testosterone and dominance. The benefits of accelerated clearance of infection and reduced weight loss during infection may outweigh costs associated with reduced social dominance in an environment where the risk of disease is high.