Four days before visiting Villarreal of Spain in the Champions League, Bayern kept a clean sheet for the sixth straight match in all competitions as they chalked up 12 points from five Bundesliga games.
Germany striker Gomez, the top scorer last season, is again leading the way this term with eight league goals. Substitute Nils Petersen completed the rout in the last minute.
"I am extremely satisfied because my team... were outstanding," Bayern coach Jupp Heynckes told reporters. "It was important we kept at it even after going 3-0 up -- that shows character.
"But I am convinced we can become even better. We know we have to improve because we have a tough few weeks ahead."
Werder Bremen went level on 12 points with Bayern after Peruvian Claudio Pizarro struck twice in a 2-1 victory over their bitter rivals, bottom club Hamburg SV.
While Werder celebrated a third win in a row and the return of defender Naldo after a 16-month injury absence, Hamburg have yet to win any of their 12 matches under coach Michael Oenning stretching back to last season.
Borussia Monchengladbach are third on 10 points after a 1-0 win over Kaiserslautern but champions Borussia Dortmund are down in 10th spot after slumping to a 2-1 defeat, their first at home in more than a year, against promoted Hertha Berlin.
Bayer Leverkusen also have 10 points following a 4-1 win at Augsburg on Friday. Hoffenheim jumped to fifth after romping to a 4-0 triumph at Mainz 05.
Bayern, without injured winger Arjen Robben, made a dream start when a quick four-pass combination ended in Toni Kroos cutting the ball back for Gomez to slot home after eight minutes.
Gomez turned provider in the 26th, setting up Ribery in the box and the Frenchman finished with an impudent backheel.
Ribery struck again four minutes before the break, flicking the ball to the right of Freiburg's Maximilian Nicu and sprinting past him to fire in.
Whatever Bayern tried, it worked and they grabbed two more goals early in the second half.
Gomez, picked out by Ribery, tapped in from close range on 52 minutes and three minutes later defender Oliver Barth's clearance hit the Germany striker and the ball sailed into the net.
He then added his fourth goal from a re-taken penalty before Petersen completed Freiburg's miserable afternoon.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.