During a joint press conference with Australian leader John Howard, he said such a move would embolden insurgents.
Mr Bush unleashed his attack on Mr Latham's stance following talks in Washington with Australian Prime Minister John Howard.
Standing side-by-side with the Australian leader, he said: "It would be a disastrous decision for the leader of a great country like Australia to say that 'we're pulling out'.
"It would embolden the enemy. It would dispirit those who love freedom in Iraq. It would say that the Australian Government doesn't see the hope of a free and democratic society leading to a peaceful world."
Mr Howard is a staunch ally of Mr Bush, and joined him in pressing other US allies to keep their troops in Iraq.
"It is the worst time imaginable for allies to be showing any weakness in relation to the pursuit of our goals in Iraq," Mr Howard said at the press conference.
Like the US leader, Mr Howard faces a tough re-election battle later this year."