As a spin off from this question on Academia.SE, under the Equality Act of 2010 can a UK employer limit a job to only women? That question has additional aspects that are not relevant to my question. Specifically, I am interested in faculty position at a university and not edge conditions like female sports players. For comparison, in Australia there have been women-only faculty positions.
Generally speaking, no: Sex is a protected characteristic and discriminating between applicants based on a protected characteristic is prohibited so an employer is not free to hire only men or women simply because they would prefer to. But there are exceptions, like “occupational requirements” (which is probably what your athlete example is getting at).
And, looking at the example you provided, it might - with a caveat - fall under an exception called “positive action”, as provided in section 158 and 159 of the Equality Act. However, the conditions under which this is allowed are tightly regulated and it would come down to the specifics (e.g. whether the number of women in that activity is “disproportionately low”).
The caveat is that the Equality Act specifies that the protected characteristic (i.e. sex/gender in this case) can only be taken into account when choosing between two equally qualified candidates. I don't know whether this was ever tested in court but this would probably preclude advertising a position as “women-only” (as opposed to soliciting applications from both men and women and then selecting a woman with the explicit goal of increasing the number of women in your department).
The Government Equalities Office guide on positive action also contains language strongly suggesting that limiting the search to women from the get go might not pass muster:
Positive action can be used at any time in the recruitment or promotion process.
However, it is expected that, in the vast majority of cases, any use of positive action as a ‘tie-breaker’ between candidates who are of equal merit for a particular post will be at the end of the recruitment process, at the actual point of appointment.
In order to use positive action provisions in a tie-breaker situation, the employer must first establish that the candidates are of equal merit.
Note that there is no such “equally qualified” clause in section 158, which deals with everything else than recruitment and promotion. Thus, it is perfectly fine to create a training programme that would be only open to women, if the goal is to increase the proportion of women in an activity where it is disproportionately low (an example provided by the same guide is a development programme “to help female staff compete for management positions”).
Incidentally, all this is allowed under EU law (articles 5 and 7 of Directive 2000/78/EC).