This paper develops an equilibrium search model to study the mechanisms underlying the life-cycle gender wage gap: human capital accumulation, preference for job amenities, and employers’ statistical discrimination in wage offers and hiring. In the model, men and women differ in turnover behaviors, parental leave lengths, and preference for amenities before and after having children. Capacity-constrained firms anticipate these gender differences when setting wages and making match decisions. Estimating the model on administrative employer-employee data from Finland, I find that a large proportion (44%) of the gender wage gap in early career is attributed to employers’ statistical discrimination based on fertility concerns, whereas gender differences in labor force attachment explain the majority of the gap (70%) in late career. Both hiring discrimination and preference for amenities draw women to low-productivity jobs in early career, and slow down their career progression in the long run. Counterfactual simulations show that shifting two parental leave months from women to men shrinks the wage gap by 13%. A gender quota at top jobs improves women’s representation in high-productivity positions, but firms undo this policy by exerting more wage discrimination. An equal pay policy closes the wage gap by 15% on average, but has unintended consequences as employers adjust on the hiring margin.