This paper contributes to the literature on the observed research funding and scientific productivity gender gap in science. On the basis of very detailed information for a sample of 276 academics at the University of Turin over a ten year period, we develop a robust new model that takes into account the three main stages of the funding-productivity nexus: applying for a grant, successful fund raising and conducting the research, to investigate at which stage the gender gap emerges. In the model, we control for differences – not previously examined together - in the time allocated to teaching, administration and child care, which might moderate the gender effect. Using a Two-Stage Least Square (2SLS) model we control, for selection into funding, endogeneity of career progress and endogeneity of funding success, and find, first, that researchers who apply for grants are active in teaching and administration and show persistent funding application behaviour, but find no evidence of a significant gender bias; second, when we control for application selection, the negative gender correlation with funding acquisition becomes stronger, while teaching is negatively correlated to the amount of funding raised; and, third, controlling for selection and reverse causality, we find that funding is not associated to higher research productivity. At all stages of the funding-productivity nexus we find negative, albeit insignificant, secondary gender effects associated with administrative tasks, but less so with teaching. In the research impact-quality estimations we provide evidence of a ‘motherhood penalty’ for female academics with young children who did not apply for funding (including evidence of a causal effect). In line with the literature, we find that, after controlling for children, female researchers are less productive in terms of publications, but not in terms of research quality or impact.