Gentner scored in stoppage time at the end of a stunning game that saw Dortmund lead 2-0 before Stuttgart scored three goals in nine minutes in the second half.
The result lifted Dortmund, unbeaten for 22 straight games, to 63 points from 28 games, six ahead of Bayern Munich who can close in with a victory at Nuremberg on Saturday.
Stuttgart are in fifth place on 40.
Dortmund have only themselves to blame for not sealing a win after dominating for more than an hour, having twice hit the woodwork and with Kevin Grosskreutz and Lukasz Piszcek wasting half a dozen clear chances.
"That was a crazy game," said Dortmund coach Juergen Klopp. "I have never been part of a game with such a change in score."
"After leading 2-0 we lost our focus and Stuttgart fought really well. I am satisfied with the draw because at some point we were already out of the game," he told reporters.
Goals from Japan international Shinji Kagawa in the 33rd and Jakub Blaszczykowski after the restart had given Dortmund a 2-0 lead and they looked to be cruising to an easy victory.
Stuttgart raced back into the contest after 70 minutes to lead 3-2 through Vedad Ibisevic and a Julian Schieber double as Dortmund's defence short-circuited in the last 20 minutes.
Mats Hummels levelled in the 82nd with a sizzling drive and substitute Ivan Perisic thought he had snatched the winner with a fine volley in the 87th as the 80,720 capacity crowd started celebrating what would have been an 11th win in 12 games.
However, substitute Gentner rescued a deserved draw for the visitors who are now unbeaten in their last six league matches.
"For such a great game it is worth being a coach," said Stuttgart's Bruno Labbadia. "It was good to see how the team never gave up despite trailing 2-0 at the champions."