Stefan Kiessling slotted in his 13th goal of the campaign after 11 minutes before Tobias Werner levelled for the battling hosts on the hour.
South Korean Son Heung-min struck against the run of play with Leverkusen's first chance of the second half to reclaim the lead in the 80th before Emre Can gave them a two-goal cushion to cut the gap to third-placed Schalke 04 to four points with Leverkusen fourth on 47.
"It is kind of a strange feeling with our last win so long ago," Leverkusen goalkeeper Bernd Leno said.
"We had a lot such games in the first half of the season where we were not the best team but still won."
The win, however, was a big relief for coach Sami Hyypia, who was under mounting pressure after five defeats in their previous six league games.
"My players did it very well," Hyypia said. "We fought very hard tonight."
Borussia Moenchengladbach's hopes of a top-four finish and a chance to play in the Champions League were hit when they slumped to a 1-0 defeat at Eintracht Frankfurt to remain sixth on 42.
At the other end of the table, Nuremberg's Swiss international Josip Drmic struck twice to take his goal tally to 15 and help his team beat VfB Stuttgart 2-0 to move up to 14th spot on 26 with their opponents tumbling to 17th place on 24.
Hamburg SV remained in the relegation playoff spot after their 1-1 draw against Freiburg as they battle to avoid their first relegation since the introduction of the Bundesliga in 1963.
- Sports & Recreation
- Sami Hyypia