Gray, a vocal Gillard supporter, was feared to be dumped from the ministry as Rudd moved to remove Gillard from office, with Gillard forcing Rudd’s hand by calling for a leadership ballot at 7pm last night.
When rumblings began in the halls of Parliament House last week about a potential leadership challenge, Gray said that Rudd lacked the “courage and strength” to be leader of the Labor party despite his ability to find cameras and create whispers.
However, Gray said that Rudd had asked him to stay despite his public criticism of him.
It is believed that Gray, along with Environment Minister Tony Burke, handed in their resignations to Rudd only to have them refused.
He said that while he did make unflattering comments about Rudd, he accepted the position in the interest of much-needed stability.
"There is a new Labor leader and we have to get on with job of a government that is working in the interest of all Australians as soon as possible," Gray said, adding that he made a "practical and pragmatic" decision.
He also said Australia would be going to the polls “as soon as possible”
The change in leadership brings back a man who was criticised for a lack of consultation on a super profits tax, which later became the mineral resources rent tax, replacing a leader who had drawn criticism of implementing a price on carbon and an emissions trading system.
It is unclear at this stage whether Rudd will seek to change either of these policies if he wins the federal election.
However, speaking after his caucus victory last night, Rudd said he wanted to reconnect with business in light of softening Chinese growth.
"The China resources boom is over and China itself, domestically, shows signs of recovering and when China represents such a large slice of Australia's own economy, our jobs, and the opportunities for raising our living standards, the time has come for us to adjust to the new challenges," he said.
"Let me say this to Australian business: I want to work closely with you. I have worked with you closely in the past, particularly during the [global financial crisis] and there were some white-knuckle moments there, as the heads of the major banks will remember.
"I am saying it loud and clear to businesses large and small across the country: in partnership we can do great things for the country's future... we have been natural partners in the past, we can be again in the future."
Leaving politics with Gillard is Greg Combet, who served as climate minister and was responsible for overseeing the implementation of the price on carbon and other green schemes, such as overhauling clean-energy financing bodies.
Ex-treasurer Wayne Swan has stepped down from the front bench, but will recontest his seat at the federal election, eyeing a backbench position.