How do parenthood and publishing contribute to gender gaps in academic career advancement? While extensive research examines the causes of gender disparities in science, technology, engineering, and mathematics (STEM) careers, we know much less about the factors that constrain women's advancement in the social sciences. Combining detailed career- and administrative register data on 976 Danish social scientists in Business and Management, Economics, Political Science, Psychology, and Sociology (5703 person-years) that obtained a PhD degree between 2000 and 2015, we estimate gender differences in attainment of senior research positions and parse out how publication outputs, parenthood and parental leave contribute to these differences. Our approach is advantageous over previous longitudinal studies in that we track the careers and publication outputs of graduates from the outset of their PhD education and match this data with time-sensitive information on each individual's publication activities and family situation. In discrete time-event history models, we observe a ∼24 per cent female disadvantage in advancement likelihoods within the first 7years after PhD graduation, with gender differences increasing over the observation period. A decomposition indicates that variations in publishing, parenthood and parental leave account for ∼ 40 per cent of the gender gap in career advancement, suggesting that other factors, including recruitment disparities, asymmetries in social capital and experiences of unequal treatment at work, may also constrain women's careers.