Harriet Harman has suggest that Gordon Brown sidelined her because she was a woman in a speech blasting sexism in Westminster.
The shadow culture secretary will link the former prime minister's decision not to make her deputy prime minister to her gender and recount how she was relegated to a dinner for leaders' wives at a major summit.
But the claims were immediately dismissed as "utter bilge" by Mr Brown's former spin doctor Damian McBride, who appeared to accuse the Labour chairwoman of being "useless".
Ms Harman was elected as the party's deputy leader in 2007, the same year Mr Brown became prime minister.
Ms Harman said "even getting to the top is no guarantee of equality".
"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.
"If one of the men had won the deputy leadership would that have happened? Would they have put up with it? I doubt it.
"And imagine the consternation in my office when we discovered that my involvement in the London G20 summit was inclusion at the No 10 dinner for the G20 leaders' wives.
"We must remember Caroline Flint's denunciation of women being used as 'window dressing'."
Ms Harman is renowned for campaigning on gender equality, work that has seen her labelled Harriet Harperson and harridan Harriet by some.
She will tell how she was urged to fit in by being "clubbable" in the bars of Westminster but her refusal to toe the line led to a "nasty" response, including from her own colleagues, who briefed the papers when she had mastitis, a condition that causes a woman's breast tissue to become painful that is usually linked to breastfeeding.
"Because I didn't conform, the punishment for being different was often nasty," she said.
"When I came back after having my first baby I was reported to the Serjeant at Arms for breaking the rules by taking my baby through the division lobby under my jacket.
"Of course I'd done no such thing - I was still fat from being pregnant.
"What made it worse was that it was obviously my own side because it was our lobby. I told the whips I'd have to miss a vote because I was ill - with mastitis. And they put it in the papers."
Ms Harman admitted that the Labour party must do more to find parliamentary candidates from diverse backgrounds, including more working class women.
Women MPs are still defined by whether they have children or get married "in a way that would be unthinkable for a man", she added.
"This can be painfully divisive amongst women MPs. In any interview, a young woman MP who doesn't have children is challenged to explain herself. Something that doesn't happen to a married man MP."
Ms Harman said although progress has been made in parliament there is now a "passive resistance" where people in positions of power "do nothing".
Political reporting remains "woefully male" and the "parliamentary press lobby is long overdue for change", she added.
Mr McBride was quick to respond to the claims that Ms Harman had missed out because of her gender, insisting Mr Brown only judged his team on whether they were "useless or not".
He insisted that former business minister Baroness Vadera had been given a "vital role" at the London G20 summit in 2009.
"As every man and woman who ever worked for him could attest, Gordon judged people on only one thing: were they useless or not," he said on Twitter.
"Shriti Vadera was given a crucial role to play at the G20 not cos of her position but cos she could make a crucial contribution, whereas someone like me had no contribution to make to the summit so I was put in charge of media for the spouses. I am a man.
"It's utter bilge from Harriet, done to make her attack on Dave look non-partisan. And shameful timing given the work GB is doing in Nigeria.
"That dinner was a gathering of Britain's leading women across all walks of life, of which I thought she'd count herself one."
Mrs Harman hit back by telling Channel 4 News: "Damian McBride you will remember was sacked from his position in government for denigrating women and he is doing it again."