Using household surveys covering 83 countries of all income levels, we document that the gender education gap in low-income countries is strikingly large and that it narrows and reverses with economic development. To study the driving forces, we propose a three-sector model in which development features skill-biased structural change and varying levels of educational assortative matching. We calibrate the model to match contrasting labor market outcomes by education and gender groups. The quantitative results suggest that females have a comparative advantage in services. Counterfactual exercises show that skill-biased structural change explains most of the narrowing gender education gap, whereas changing assortative matching plays only a minor role.