Hoffenheim were denied a spot-kick after just four minutes when the video assistant referee (VAR) spotted Kramaric went down in the area, but there was no contact from Nuremberg’s Brazilian defender Ewerton.
The home side eventually had their chance from the penalty spot when Nuremberg’s Patrick Erras handled in the box and Kramaric sent Christian Mathenia the wrong way.
It was one-way traffic from Hoffenheim in the first half as forward Ishak Belfodil also hit the post.
Nuremberg gave hope to travelling fans when their captain Hanno Behrens equalised just after the hour mark.
Typically, Hoffenheim coach Julian Nagelsmann reacted by reinforcing his attack with Hungarian striker Adam Szalai coming on.
The bold move was rewarded when Belfodil found Kramaric in the box and his clever flick sealed the win to move Hoffenheim up to eighth – just three points from the European places.
Nuremberg claimed an unwanted record as their points tally of 13 is the lowest in the league’s history after 25 games.
“The whole of Germany doesn’t reckon we’ll do it, but we still believe we can stay up,” said Nuremberg goalkeeper Mathenia.