The attacking duo made light work of the Giallorossi and ensured they breezed into the knockout stages
The German champions made it four wins from as many matches in Europe's premier club competition this season with a convincing performance in the Group E clash at the Allianz Arena.
And while it was a far cry from their 7-1 drubbing of the same opponents in the Italian capital last month, Bayern were rarely troubled.
In the absence of the ill Arjen Robben, Ribery took centre stage and set the early tone when he coolly steered in a 38th-minute opener.
The home side then sealed victory as Gotze converted Robert Lewandowski's smart cross in the 64th minute.
Pep Guardiola's side are guaranteed to finish top of the group, with Roma's progression very much in the balance after CSKA Moscow's surprise 2-1 win at a nine-man Manchester City.
Robben was a late withdrawal due to a stomach bug that left Bayern with just six substitutes, while Francesco Totti and goalkeeper Morgan De Sanctis dropped to the bench for the visitors.
De Sanctis was replaced by Poland's Lukasz Skorupski, who made just his seventh appearance for the club, but he had little to do in the early stages as Bayern were restricted to a series of strikes from distance despite dominating possession.
Juan Bernat had a promising effort well blocked by Vasilis Torosidis from inside the penalty area, but Roma, wary of a repeat of last month's thrashing, packed bodies behind the ball and were well organised.
David Alaba's 33rd-minute effort, which bounced just wide, was a warning for Roma, though, and their resistance was finally broken by Ribery soon after.
The winger fed Alaba, who surged down the left, and his well-placed cut-back meant Ribery did not have to break stride before side-footing the opener, via the inside of the right post.
Ashley Cole was introduced at half-time for Roma, but he did little to stem the flow of Bayern attacks, as first Alaba headed onto the roof of the net before Lewandowski nodded at Skorupski.
Alessandro Florenzi, who appeared to injure his ankle in the first half, was eventually replaced by Miralem Pjanic but Roma's hopes of a comeback were dashed when Gotze doubled Bayern's lead.
Lewandowski ran down the left and bent an excellent cross into the path of Gotze, who showed impressive agility to loop an effort over Skorupski and into the right corner.
Ribery went close to scoring a second, shooting over to end a great move that involved Rafinha and Alaba, and the Austrian just missed the target with a 25-yard free-kick 13 minutes from time.
Bayern goalkeeper Manuel Neuer was called on late to keep out efforts from Gervinho and Radja Nainggolan - the latter denied by a superb save - but two goals were more than enough for a dominant Bayern, who reached the knock-out stages with two group matches to play.