Are women disproportionately attracted to work environments where cooperation rather than competition is rewarded? This paper reports the results of a real-effort experiment in which participants choose between an individual compensation scheme and a team-based payment scheme. We find that women are more likely than men to select team-based compensation in our baseline treatment, but women and men join teams with equal frequency when we add an efficiency advantage to team production. Using a simple structural discrete choice framework to reconcile these facts, we show that three elements can explain the observed patterns in the team-entry gender gap: (1) a gender gap in confidence in others (i.e. women are less pessimistic about their prospective teammates' relative ability), (2) a greater responsiveness among men to instrumental reasons for joining teams, and (3) a greater pure preference for working in a team environment among women.