It was the third time in less than three years that Gillard found herself at the center of dissension within the Labor Party, the Australian Broadcasting Corp. reported.
Gillard accepted the result "with a sense of deep humility and a sense of resolve," saying the question of who should lead the party had been settled "in the most conclusive fashion possible."
Deputy Wayne Swan also retained his position.
The split arose earlier in the day when Simon Crean demanded former party leader Kevin Rudd, who served as prime minister from 2007 to 2010, stand for the party leadership position.
"It's about time he stood up and instead of having his camp leak things, actually have the courage of his convictions and his belief," Crean said.
Crean said he would be running as Rudd's deputy.
Shortly before the caucus meeting, however, Rudd announced he would be "honoring his word" and not running against Gillard.
He repeated a previous pledge that he would only return to leadership "if there was an overwhelming majority of the parliamentary party requesting such a return, drafting me to return, and the position was vacant."
Rudd said "those circumstances do not exist."