Gordon Brown could have had a woman as deputy PM. He bottled it

When he had the chance to appoint Harriet Harman, his fine words failed to match his actions

We all believe in equality, don't we? If you're on the centre-left, it's axiomatic that you enthusiastically support equal rights for women, LGBT people and members of the BME community. That's great, as far as it goes, but I can't help wondering sometimes whether it means any more than a careful adherence to correct forms of language. It's not so long since I heard a former Labour MP make a tasteless private joke about domestic violence, and I was shocked by the number of men on the left, including Tony Benn, who rushed to defend Julian Assange when he faced accusations of rape and sexual assault. Sadly, this is a subject where the adage "think left, live right" all too often applies.

Take the case of Gordon Brown, who was savaged last week by Labour's deputy leader Harriet Harman. These days Brown is a United Nations special envoy for global education, and he has championed the cause of girls' education in particular. He has been a vocal supporter of the cause of the Chibok girls, abducted three months ago from their school in north-eastern Nigeria, and met Nigeria's President Goodluck Jonathan on a recent visit to the country. Earlier this month, during a rare intervention in the Commons, Brown called for British troops to be sent to Nigeria to help in the search for the girls. He spoke forthrightly about "the battle between the girls of the world and backward-looking extremists" and highlighted the opportunities that should be "every girl's birthright".

So, what did Brown actually do when he had his own opportunity to shatter the glass ceiling? Unlike the Conservatives, who can at least lay claim to Margaret Thatcher, the Labour Party has yet to produce its first woman prime minister. It hasn't even produced a female deputy prime minister, a failure which lies entirely at Brown's door. In 2007, when Brown succeeded Blair as Labour leader and PM, he had an open goal in front of him. Harman had just won a close contest to succeed John Prescott as deputy leader and she expected, quite reasonably, that she would be made deputy prime minister. She was not, and the role remained vacant for the whole of Brown's premiership. I was outraged, not just for her but for the wider cause of women in public life.

It has taken seven years for Harman to say how she felt about being sidelined, and even then she did not name her former boss directly. "Imagine my surprise when having won a hard-fought election to succeed John Prescott as deputy leader of the Labour Party, I discovered that I was not to succeed him as deputy prime minister," she said on Tuesday. She asked her audience to imagine what would have happened if the same thing had happened to a man, doubting whether he would have put up with it.

I'm sure she's right. Despite the slogan of those old L'Oreal ads – "Because I'm worth it" – women are conditioned not to big themselves up in public. Sadly, a similar reticence does not affect many men who go into public life; the only MP in living memory to express doubts about their suitability for a job was Estelle Morris, who resigned as education secretary in 2002. Self-doubt, fear of appearing ambitious and a thin skin combine to hold many women back, not just in politics, but the stakes in Parliament are much higher.

Women don't make up even a quarter of MPs and Harman was right to say that British politics has a long way to go before it is representative of society in terms of women, race and class. Everyone knows that the Conservatives have a problem with all these issues. What's shocking is that the centre-left parties have so much more to do if they are to match their rhetoric with action.

Labour has been selecting candidates for next year's general election and so far, hardly any women have been chosen in "open" selections; the party still depends on all-women shortlists to increase its share of female MPs.

To be fair to Labour, the Liberal Democrats' record on gender is much worse, with so few female MPs on its benches that the imbalance has become a standing joke. The party also has a shameful record of failing to support women who complain about sexual misconduct; it took five years for a former Lib Dem MP, Mike Hancock, to apologise to a female constituent and acknowledge that he had made her feel "degraded" and "uncomfortable".

I'm convinced that some men in both parties suffer from a disconnect between what they say and what they do, apparently not realising that all that stuff about equality actually applies to them. Untested assumptions about gender, race and class have a profound impact on politics, and I wish that Harman had gone public about her own exclusion back in 2007. I can see why she didn't: loyalty to the leader is expected of women in the party, and she would have understood the likely consequences of speaking out. Sure enough, some commentators launched distasteful personal attacks last week, implying that she wasn't up to the job – a test that would rule out many male candidates for high office if strictly applied.

The idea that Harman was any less qualified than Prescott is risible, but the sneer will have a chilling effect on other ambitious women. Politicians should remember that sometimes actions speak louder than words: Brown's campaigning for girls' education is welcome, but the symbolic act of appointing the UK's first female deputy prime minister was in his gift. And he bottled it.