Vedad Ibisevic's penalty had put the Swabians ahead in the 12th minute and it seemed like that would be enough to lift Bruno Labbadia's men into 11th place in the Bundesliga, but a penalty from Stefan Kiessling brought Leverkusen back on level terms 10 minutes from the end.
Lars Bender then completed the turnaround, earning Leverkusen all three points to establish a seven-point cushion above fourth-placed Eintracht Frankfurt in the hunt for a place in the Champions League next season.
Stuttgart were gifted the lead when Philipp Wollscheid fouled Ibisevic inside the box, and the Bosnian converted from the spot.
The game then became defined by a clear pattern as Leverkusen searched intently for an equaliser.
Kiessling was denied three times by a mixture of Stuttgart goalkeeper Sven Ulreich and defender Serdar Tasci as it looked like it would be a frustrating night for the home team.
Stuttgart gained more courage in the second half and missed a few chances to put the game beyond their hosts, and they were punished in the 81st minute.
Cristian Molinaro handled the ball inside the penalty area, allowing Kiessling to score his 16th goal of the season and bring Leverkusen level at 1-1.
Just a few minutes later, Kiessling's header was saved by goalkeeper Ulreich, but Bender was on hand to nod in Leverkusen's second goal and clinch all the points.