Hoffenheim go top with 3-3 draw at Stuttgart
Lacklustre Hertha Berlin dropped to second with an inferior goal difference after a 2-1 defeat away to VfL Wolfsburg courtesy of a second-half Edin Dzeko brace, while Bayern Munich remained fourth after losing 2-1 at home against Cologne.
Hoffenheim, who missed a stoppage time penalty through Sejad Salihovic, and Hertha have 40 points.
"The fans got their money's worth today," Hoffenheim coach Ralf Rangnick said. "We could have won it in the end but we can live with the 3-3."
In a frantic 21 first-half minutes both teams scored twice, starting in the 24th when Andreas Beck found Ba inside the box, the striker firing past keeper Jens Lehmann from a tight angle.
Stuttgart, who have not lost in the league since November, levelled two minutes later through Cacau and went ahead with a Mario Gomez header.
Ba equalised seconds before the break, chasing down an Isaac Vorsah through ball, beating two defenders and firing past Lehmann.
He scored an almost identical third, four minutes after Gomez had bagged his second with a wonderful lob over keeper Daniel Haas.
Champions Bayern Munich lost 2-1 at home against Cologne, their third defeat in four league matches with some fans whistling and booing at the Allianz Arena.
They remain in fourth place two points behind the leaders and one short of Hamburg SV, who are away to Bayer Leverkusen on Sunday.
Cologne coach Christoph Daum said his team were lucky to get away with a win. "Bayern were certainly the better team but in soccer it is goals that count and that is where we were luckier today."
Bayern coach Juergen Klinsmann was angry at yet another defeat.
"Quite a bit went wrong today," Klinsmann said. "This defeat angers us and we have again missed the chance to go top of the table."
Bayern stormed forward but despite about 80 percent possession in the first half, created no clear chances.
It took Cologne, largely boxed into their own half, 22 minutes to make their presence felt when Nemanja Vucicevic found Fabrice Ehret, who raced past Martin Demichelis and lifted the ball over keeper Michael Rensing to give his team the lead.
Bayern's unstable defence caved in again 12 minutes later when Vucicevic did well to leave Philipp Lahm standing and found Daniel Brosinski in the box to net Cologne's second.
Daniel Van Buyten gave the hosts a glimmer of hope when he pulled one back with a header in the 84th but it was too little too late for the Bavarians, who have wilted since the winter break, taking only three points from four matches.
Bottom team Borussia Moenchengladbach earned a hard-fought 3-2 victory against Hanover after squandering a two-goal lead but grabbing the winner through veteran Oliver Neuville seven minutes from time.
Energie Cottbus also got all three points against Werder Bremen with a 90th minute strike by Dimitar Rangelov to win 2-1 and move up to 14th. Werder have dropped to 11th place.
Third-placed Hamburg SV take on Bayer Leverkusen on Sunday.