Relevant: stereotype threat and testosterone
The important thing here is that gender sterotypes are merely a subset of an ability focused approach. Telling kids you are smart, or that your gender does well on these tests is roughly the same thing. High-T people (competition-oriented) react very positively to an idea that they have more ability than others, and very negatively to the opposite. Low-T people don't really seem to care much.
At any rate, split kids into two class. Put the low-T kids into a class with a growth mindset, and feed high-T kids with ideas that they have superb innate ability.
(Continuing the posting of select posts from Slate Star Codex for comment here, as discussed in this thread, and as Scott gave me - and anyone else - permission to do with some exceptions.)
Scott Alexander recently posted about growth mindset, with a clarificatory followup post here. He discussed some possible weaknesses of its advocates - as well as their strength. Here's a quote outlining the positions discussed: