Understanding how social perceptions of gender roles influence leader effectiveness is very important because female leaders are still far underrepresented in most organizations. Despite abundant research on the backlash against female leaders displaying masculine leadership roles, little is known about how female leaders could overcome negative effects of gender stereotypes to enhance leader effectiveness. Drawing on a legitimacy perspective and expectancy violation theory, this research investigates how leaders’ sex and competence moderate the indirect relationship between leaders’ gender roles and leader effectiveness through subordinates’ affective trust. Through a two-wave study of 489 subordinates, we have found that leaders’ high competence positively moderates the indirect effect of both leaders’ gender roles (masculinity and femininity) on leader effectiveness through subordinates’ affective trust; whereas this moderating effect only holds for female leaders, not for male leaders. Demonstrating a bonus effect of leaders’ competence for female leaders, our research contributes to the existing gender and leadership literature by addressing the approaches for female leaders to leverage gender role perceptions to overcome gender bias and achieve leader effectiveness.