speaker Peter Slipper over lurid text messages sent to an aide which included crude references to female genitalia.
Abbott said Slipper was not a "fit and proper" person to hold the office after court documents revealed text conversations he had with ex-staffer James Ashby, who has accused him of sexual harassment.
The texts included one in which Slipper called a conservative female politician an "ignorant botch (sic)" and another in which he said women's genitalia looked "like a mussell (sic) removed from its shell".
"Every day the Prime Minister stands in this parliament to defend this speaker will be another day of shame for this parliament, another day of shame for a government which should already have died of shame," Abbott said.
But in a blistering address, Gillard accused Abbott of hypocrisy and double-standards.
"What the leader of the opposition should be ashamed of is of his performance in this parliament and the sexism which he brings with it," she said.
The unmarried Gillard said she had been offended by many of Abbott's remarks over the years, including that she should "make an honest woman of herself" politically and a comment that abortion was "the easy way out".
"I will not be lectured about sexism and misogyny by this man," she railed in parliament as she pointed at Abbott.
"I will not, and the government will not, be lectured about sexism and misogyny by this man, not now, not ever.
"If he wants to know what misogyny looks like in modern Australia, he doesn't need a motion in the House of Representatives, he needs a mirror," she added.
Slipper stood aside in April amid claims of gay sex harassment and travel fraud, while proclaiming his innocence and slamming a "trial by media".
The travel fraud claims were later withdrawn. But the sex harassment case, in which the married Slipper is accused of sending former aide Ashby lurid and inappropriate text messages, is ongoing.
Abbott's motion to remove Slipper was defeated 70 votes to 69.
His removal would have been a blow to Gillard who last year engineered his promotion to speaker after he defected from Abbott's Liberal Party, a move that lost the opposition one vote and shored up her wafer-thin hold on power.