Andre Hahn gave the visitors a surprise lead, but Simon Rolfes pegged them back with an equaliser 11 minutes before half-time and midfielder Emre Can popped up with a winner with seven minutes remaining.
Elsewhere, Wolfsburg moved up to fifth by beating Werder Bremen 3-0 in a derby at the Volkswagen Arena courtesy of goals from Maximilian Arnold, Ivica Olic and Ivan Perisic.
Eintracht Braunschweig remain rooted to the foot of the table after a double from Shinji Okazaki secured a 2-0 victory for Mainz.
Hoffenheim moved into the top half of the table and leapfrogged nine-man Hannover by beating them 4-1 in their own backyard, with Roberto Firmino scoring twice in the space of two second-half minutes.
Striker Mame Biram Diouf was sent off for two bookable offences after just 12 minutes and Marcelo was also dismissed after remonstrating with the referee in the 64th minute on a miserable afternoon for Hannover.