Previous studies have documented a gender gap in the study of economics in Canada, the UK, and the US. One important factor may be women's low expectations about their ability to succeed in economics courses. Women in our sample expect to do less well than men in an introductory microeconomics course, even after controlling for variables relating to family background, academic experience, and mathematics experience. These expectations are partly self-fulfilling, since expected grades have an important and positive effect on class performance. We also find that having taken an economics course in secondary school actually has a negative effect on performance. We observe this negative effect for women and men, but it is more pronounced for women. When we control for both expectations and secondary-school experience with economics, the independent effect of gender is small and insignificant.