Some 44 points separated the two teams at kick-off and 47 were between them come the final whistle, but the gap seemed far smaller during a combative 90 minutes at the Rhein-Neckar Arena.
"It was a very tough game," said Heynckes. "Our opponents are in the thick of it and they played with an amazing level of courage, aggression and energy.
"We had to work hard for this win. It was not classy, but we still get three points for it.
"You can't score three or five goals every weekend. We had to roll up our sleeves."
Mario Gomez scored the decisive goal just before half-time for a Bayern side which had several changes, including former Hoffenheim goalkeeper Tom Starke making his debut in the Bayern goal.
He helped Bayern set a new league record of 583 minutes without conceding away from home, and said it was to be expected that his side would struggle.
"You've got to win dirty sometimes," he said on Bayern's website. "Hoffenheim played well, but we made the breakthrough in the end and got the three points."