Croatia striker Andrej Kramaric netted his eighth goal in four games with a superb strike, curled inside the far corner, to give Hoffenheim the lead on 18 minutes.
However, Japan midfielder Daichi Kamada turned the game on its head when he tapped home on 54 minutes, then powered through the defence before Bas Dost stabbed the ball over the line 19 minutes from time to claim the three points.
It could have been 3-1 as Frankfurt had a late goal disallowed.
Elsewhere, UEFA Champions League side Borussia Moenchengladbach romped to a 3-1 win at Cologne as Alassane Plea and Stefan Lainer fired home before Lars Stindl added a penalty on 56 minutes.
Cologne scored a consolation goal when Elvis Rexhbecaj beat Gladbach keeper Yann Sommer from 20 metres out.
Bremen earned a second win in three games when Leonardo Bittencourt's right-footed shot on 27 minutes sealed its 1-0 win at home to newly promoted Arminia Bielefeld.
The hosts survived a late scare as Bielefeld had a goal disallowed just before the whistle.
At Stuttgart, Bayer Leverkusen was held to a 1-1 draw as Patrik Schick's early goal was cancelled out by an equaliser by Stuttgart striker Sasa Kalajdzic.