كتب : Hatem Maher
The Senegalese striker gave Hoffenheim the lead after 24 minutes but Cacau cancelled out his effort two minutes later.
Stuttgart went ahead through a Mario Gomez header before Ba restored parity on the stroke of halftime.
Gomez scored his second of the night in the 63rd minute but Ba completed his hat-trick shortly after to secure a share of spoils.
Surprise package Hoffenheim went top of the table with 40 points.
Hertha Berlin, who slumped to a 2-1 away defeat to VfL Wolfsburg, have the same amount but lie second due to their inferior goal difference to Hoffenheim.
Title holders Bayern Munich suffered their third defeat in four matches following a 2-1 loss against Cologne to slip to fourth.