Four days before facing Villarreal in Spain in the Champions League, in-form Bayern kept a clean sheet for the sixth straight match in all competitions as they moved to 12 points from five games.
Gomez, who was the league's top scorer last season, has notched eight goals in five league games. Substitute Nils Petersen completed the rout with a goal in the last minute.
"We started very, very well. We were extremely strong today," Bayern's Bastian Schweinsteiger told reporters.
"Many people will say that Freiburg did not play well but we just did not allow them to come into the game at any moment. Defensively we were again outstanding."
Borussia Moenchengladbach moved into second place with a 1-0 win over Kaiserslautern, while champions Borussia Dortmund lost further ground after slumping to a 2-1 home defeat, their first in over a year, to promoted Hertha Berlin to stay on seven points in 10th place.
The Bavarians, without injured winger Arjen Robben, needed less than 45 minutes to seal their fourth consecutive league win.
They got off to a dream start after eight minutes, with a quick four-pass combination that culminated in Toni Kroos cutting the ball back for Germany international Gomez to slot home.
Gomez turned provider in the 26th minute, setting up Ribery in the box, who finished with a backheel through the legs of Freiburg defenders.
Ribery struck again four minutes from the break, flicking the ball to the right of Freiburg's Maximilian Nicu and sprinting past him from the left to fire in.
Whatever Bayern tried worked like clockwork. The hosts grabbed two more goals early in the second half. First Gomez, picked out by Ribery, tapped in from close range on 52 minutes; three minutes later defender Oliver Barth's clearance hit Gomez and the ball sailed into Freiburg's net.
Gomez added another with a retaken penalty before Petersen completed Freiburg's miserable afternoon.
- Related links