The 32-year-old has fallen out with Bayern coach Louis van Gaal and has barely featured this season, leading to him being left out of recent Italy squads.
"Roma and Bayern Munich announce that they have reached an agreement for the free loan of Luca Toni starting from January 2, 2010," Roma said in a statement, adding that the 2006 World Cup winner had passed a medical on Wednesday.
Toni's arrival gives coach Claudio Ranieri a much-needed option in attack with only Francesco Totti and Mirko Vucinic seen as out-and-out strikers in the squad and Julio Baptista consistently failing to impress.
Roma, with a limited budget after two failed takeover attempts in two years, had a poor start to the Serie A season and coach Luciano Spalletti left after just two games.
They have since improved markedly under Ranieri and surged up the table into the fourth Champions League qualifying spot before the mid-season break.
Toni, previously a regular starter and scorer at Bayern after moving from Fiorentina in 2007, will not be helped in his bid for a World Cup spot in June if new team mate Totti decides to come out of international retirement for South Africa.
Totti will meet with coach Marcello Lippi in February.
Futures remain unclear for Ancelotti, Ranieri
Bayern Munich win at Freiburg
Factbox - Claudio Ranieri
It's do or die for Bayern Munich
Europa League: PSV, Roma reach last 32