We show that gender inequality decreases the variety of goods countries produce and export, in particular in low-income and developing countries. We argue that this happens through at least two channels: first, gender gaps in opportunity, such as lower educational enrollment rates for girls than for boys, harm diversification by constraining the potential pool of human capital available in an economy. Second, gender gaps in the labor market impede the development of new ideas by decreasing the efficiency of the labor force. Our empirical estimates support these hypotheses, providing evidence that gender-friendly policies could help countries diversify their economies.