Japan winger Kagawa scored twice in Dortmund's 3-1 win over Hoffenheim, which means the defending champions remain second and level on 40 points with Bayern, with Munich only top due to goal difference.
Germany striker Gomez has now scored 17 goals in 18 league games this season, after Bayern bounced back from their shock 3-1 defeat at Borussia Mönchengladbach with a win over Wolves.
The 26-year-old fired one home at Munich's Allianz Arena with an hour on the clock after France winger Franck Ribery was fouled and Gomez converted a free-kick from Germany team-mate Toni Kroos.
Dutch winger Arjen Robben added Bayern's second in the 92nd minute when the ball went in off his stomach.
"We had good chances in the first half, but we didn't take them," said Bayern coach Jupp Heynckes.
"This time (unlike against Gladbach), we had the luck and the ability to take the lead through a set-piece.
"In terms of our scoring chances and the way we played, the win was deserved."
Dortmund stayed in touch after their home win over Hoffenheim, with Kagawa in dazzling form for the hosts.
The champions suffered bad news in mid-week when it was revealed teenage midfield star Mario Götze will be out for up to eight weeks with a groin injury.
But Kagawa teamed up with Kevin Grosskreutz to compensate for Götze's loss.
The Japan star put Dortmund ahead after just 16 minutes before Grosskreutz slotted home the hosts' second after 31 minutes.
The pair then combined for the stunning third goal, when a crisp back-heel from Grosskreutz landed in Kagawa's path and he fired home from close range on 55 minutes.
USA defender Fabian Johnson scored a 63rd-minute consolation for Hoffenheim, but it was too little, too late.
"We were very strong in the opening phase, but didn't convert all our goal chances," said Dortmund coach Jurgen Klopp.
"In the second half, we saw what can happen if we hadn't put in so much work in the first half (as Hoffenheim came back).
"It was an excellent home game."
Third-placed Schalke 04 have the chance to join Dortmund and Bayern on 40 points if they beat Cologne on Saturday night.
At the other end of the table, bottom side Augsburg were held to a 2-2 draw at home to fellow relegation contenders Kaiserslautern, who remain third from bottom.
Hamburg bounced back from last weekend's hammering at home to Dortmund with a 2-1 win at Hertha Berlin in the capital city.
Werder Bremen stay fifth and Bayer Leverkusen sixth after they drew 1-1 in Bremen.
Fourth-placed Gladbach need to win at VfB Stuttgart on Sunday to stay in touch with the leaders.