If you want to attract some contingent of students to your institution, then provide an attractive work environment for them. It is really as simple (complex) as that. It doesn't have to be just the male/female breakdown here, but it applies there of course.
First, consider the answer here of user Dawn who suggests a tipping point. But how do you get to the tipping point. Others have suggested money, but I'm pretty sure that is insufficient, though it may be necessary.
First, how many women do you have on the faculty? Is it enough? Why not. Is it harder for them to get tenure? Why is it harder to get tenure? Women (in the US, at least) often have societal demands put on them that they can't avoid and that makes a rapid advance to tenure impossible. In a related case, I had a brilliant female colleague who had to delay her career to take care of an ailing mother. Men almost never have that problem as someone else (a woman) will do that instead. Women also need to have accommodation made for childbirth as no one else will take over that burden. Men don't have to delay family or choose between career and family. Single parents are usually (not always) women. Do you pay young women enough that, especially if they are single parents, they can afford proper childcare without sacrificing their research? Rigid rules around tenure and salary work against you here. Tailor the system so that it is consistent with your overall goals and flexible enough to accommodate special situations.
So, work to build up (and tenure) your female (or other "minority") faculty.
Next is the question of how welcoming the environment is for students. Look not only to universities with a better balance, but look also to small women's colleges (and Historically Black colleges). Why do students want to go there? The faculty has a lot of women, of course, but not all. However, the environment has a lot of people who "look like me." (Tipping point again). But, beyond that, those places also seem to me to be better at mentoring young students. In many of them the faculty and students are on first name basis with one another. The professor becomes a role model, not just a teacher.
So, make sure mentoring happens. This can work for everyone, not just women.
Next, is the actual work schedule sane or insane? Do you require long hours in the lab that may be possible for men (who have external support for the daily tasks of living) and not so much for women (who often are left with those tasks. Does your environment lead to burn out for some? That is unhealthy for everyone and leads to extreme stress. Some questions on this site suggest that it is more common than it should be. Some of the techniques for reducing stress, by the way, require additional time and effort. That may be harder for those with outside responsibilities. On a related note, is your work schedule so intense and competitive that backstabbing among students (or even with professors) happens? Do you have a way to make that stop? A number of questions on this site indicate that it happens more than it should. Even people "stealing" the research product of others.
So, assure that the work schedule is sane and not overly stress inducing.
Next, how are women treated day to day by both faculty and other students. Is there some low level of sexual harassment that is tolerated? Are you sure? There are faculty who prey on students, of course. Are you sure that you have a way to both recognize that and to force it to stop? Do you have formal standards of conduct that apply to both faculty and students. Note that mentoring (of both males and females) can help here. A quiet word from a mentor can change behavior when needed.
So, make sure that no one needs to deal with the "ick factor".
Next, who's questions and opinions are valued? Is it only extroverts who get a chance to say anything or to represent a working group? Does your faculty have sufficient training to assure that every student's ideas are valued? Fairly simple, but required, teaching seminars can improve the classroom/lab environment. They will probably be resented by some, but you have to ask, what is important? If you only value high pressure ego driven research progress, you will attract only people who are comfortable in that environment.
So, consider your values and find ways to operationalize them, not just talk about them.
And note that you don't have to sacrifice research quality or output to do these things. Take CMU, for example.
For what it is worth, I never had a situation in which I thought a female colleague was less able than her peers, including myself. I have a pretty big ego, of course.
And yes, I realize that I answered a slightly different question.