The business, which includes the Hovis, Mr Kipling, Sharwood's and Bisto brands, was previously with Vizeum.
Universal pitched against Vizeum, Starcom Group and OMD UK for the account.
Presentations were held last week after RHM called a pitch in November.
The review was instigated by the food group's marketing and procurement teams as part of a due-diligence process to ensure it was getting the best value from its media.
Ginny Knox, RHM's group marketing director, said: "Universal McCann was out ahead with its proposed approach and we feel confident that we can work well and successfully with it."
Universal's pitch team was led by the recently appointed joint managing directors Andy Jones and Damian Blackden. Blackden said: "The reason we scored on so many counts was because we've such a talented team of individuals here. We can't wait to start adding value to RHM's business."
Creative for RHM was unaffected by the media review. DDB London handles the Hovis account, while TBWA\ London has the Sharwood's business. Bartle Bogle Hegarty handles Bisto and Saatchi & Saatchi Mr Kipling.