Gundogan’s header in the 17th minute was enough to lift Dortmund off the foot of the table, although they could have won more handsomely.
Pierre-Emerick Aubameyang had two efforts disallowed for offside and he was also denied by a post before Dortmund rode their luck late on.
Klopp was able to welcome Mats Hummels back into his side, while goalkeeper Roman Weidenfeller was surprisingly left on the bench as one of five changes to the team beaten 2-0 by Eintracht Frankfurt last Sunday.
Dortmund raced out of the traps, forcing Hoffenheim to defend from the outset.
It took just 16 minutes for the pressure to pay off, with Aubameyang delivering a delightful cross to the unmarked Gundogan, who headed in at the far post.
It was a deserved lead for a Dortmund side desperately looking to turn around what has been an awful domestic season to date.
They failed to build on their lead, though, and Sebastian Rudy gave them a scare at the start of the second half with a free-kick which Hummels, having raced back from the wall, had to flick over his own bar to prevent a goal.
Dortmund stepped up their efforts to double their lead and felt they had done just that when Aubameyang found the net, but the assistant’s flag was raised, in error.
Another Aubameyang effort was ruled out heading into the final 20 minutes, although the official was right on this occasion and there were no complaints from the Gabon forward.
Oliver Baumann turned another Aubameyang shot on to the outside of the post as Dortmund tried to earn a bit of breathing space.
They nearly paid for their profligacy when Neven Subotic appeared to foul Tarik Elyounoussi inside the area late on, but no penalty was awarded as Dortmund breathed a sigh of relief as they closed out their first win in almost a month.