The Labour leader praised his deputy as a “fantastic woman and formidable politician” and called for an end to the sexist culture in Westminster.
Sir Keir was responding to reports in The Mail on Sunday that some unnamed Conservative MPs claimed that Ms Rayner had tried to put Boris Johnson “off his stride” in the Commons by crossing and uncrossing her legs.
The former head QC told ITV’s This Morning there would be “zero tolerance” for such attitudes in his own party.
He said: “It is rank sexism, rank misogyny. She was really disgusted that all of her political attributes were put aside for this ridiculous, offensive story.
“She shouldn’t have to put up with it but all women in politics shouldn’t have to put up with it. Almost every woman in politics has had an element of this in some shape or form.
“We have got to change the culture. The culture in Parliament, it is sexist, it is misogynist. We need to change it.
“That is what Angela said to me. She used this expression, she said ‘It triggered something in me about the way women are seen in politics’.”
He added: “I need to look at it within my own party wherever we see it. We will be absolutely on it with zero tolerance. There shouldn’t be a party political divide on this.”
Mr Johnson, who publicly condemned the claims on Twitter, was reported to have written to Ms Rayner privately expressing his sympathy and assuring her the comments were “not in his name”.
Technology minister Chris Philp there was “ongoing, active work” to root out such “offensive views” within the Conservative Party.
He said he expected efforts would be made to find out who spoke to The Mail on Sunday political editor Glen Owen but suggested the chances of success were limited.
“I think that if anyone is identified having views like those that were expressed, which are just outrageous and misogynistic, then I would expect serious consequences to follow,” he told the BBC Radio 4 Today programme.
“I expect efforts will be made to identify who is responsible for those views. But journalists fiercely guard their sources and I doubt Glen Owen will be volunteering that information.”
The Independent Press Standards Organisation, the industry watchdog, said it was receiving “a high volume of complaints” about newspaper’s report and was dealing with these “under our normal procedures”.
Associated Newspapers, which publishes The Mail on Sunday, has declined to comment.
Earlier the former Scottish Labour leader Kezia Dugdale claimed the allegation was an example of the “extreme misogyny” women in politics face.She said: “You’re just hearing about this particular example because Angela Rayner is senior enough to have power and agency to call it out and demand that there are consequences for what has happened.
“But for a lot of women, they just have to quietly put up with comments like this on a day-by-day basis.
“It’s really, really disappointing and kind of depressing that despite the increased levels of women’s representation we’ve got in politics across the United Kingdom, the culture hasn’t changed anywhere near to the extent that it should have.”