The goal of the research was to explore the role of motivation, gender roles and stereotypes in the explanation of students' educational outcomes in a stereotypically male educational domain: physics. Eccles and colleagues' expectancy-value model was used as a theoretical framework for the research. The research sample included 736 grammar school students from Zagreb, Croatia. The variables explored were expectancy of success, self-concept of ability and subjective task values of physics, gender roles and stereotypes, and educational outcomes: academic achievement in physics, intention to choose physics at the high school leaving exam, and intention to choose a technical sciences university course. The results showed that girls had a lower self-concept of ability and lower expectancies of success in physics compared to boys, in spite of their higher physics school grades. Hierarchical regression analyses showed that self-concept of physics ability was the strongest predictor of physics school grades, whereas the utility value of physics was the key predictor of educational intentions for both genders. Expectancy of success was one of the key predictors of girls' educational intentions, as well. Endorsement of a typically masculine gender role predicted girls' and boys' stronger intentions to choose a stereotypically male educational domain, whereas acceptance of the stereotype about the poorer talent of women in technical sciences occupations predicted girls' lower educational outcomes related to physics. The practical implication of the research is the need to create gender-sensitive intervention programmes aimed at deconstructing the gender stereotypes and traditional gender roles that restrain students from choosing gender-non-stereotypical careers.