(Updates with Guardiola, Wolfsburg win)
By Karolos Grohmann
BERLIN, Nov 2 (Reuters) - Bundesliga leaders Bayern Munich struggled past Hoffenheim 2-1 to reclaim top spot in the Bundesliga on Saturday and equal a 30-year-old league record with their 36th straight game without defeat.
Thomas Mueller scored the winner 15 minutes from time to send last season's treble winners to 29 points, one ahead of Borussia Dortmund, who briefly took over the lead on Friday after crushing VfB Stuttgart 6-1.
Bayern, facing Viktoria Plzen in the Champions League next week, were far from their dominant self but it was still enough to equal Hamburg SV's record from 1982/83. Their last defeat was in October 2012 to Bayer Leverkusen.
"It certainly was not our best performance, but we won," Bayern coach Pep Guardiola told reporters. "Not everything worked well, which means we have to correct it.
"It has been tight against Hoffenheim in the past few games but today it was us who were lucky."
Teenager Niklas Suele made the most of a disastrous Manuel Neuer error with the Bayern keeper failing to hold on to a high ball and Hoffenheim going in front in the 34th minute.
This was the first home game for Hoffenheim since their 2-1 defeat by Bayer Leverkusen two weeks ago courtesy of a Stefan Kiessling "phantom goal" that went in through the side netting.
The visitors, who needed 20 minutes to get started, levelled five minutes later when Franck Ribery's low free kick was deflected in by Mario Mandzukic for the Croat's eighth goal of the season.
With Javi Martinez and Mario Goetze making their first starts for months but Arjen Robben missing through injury, Bayern maintained control of the game but never hit top gear, lacking Dutchman Robben's pace on the wing.
"We seem to always start badly, I don't know why," said Goetze, who joined from rivals Borussia Dortmund.
"For me it is important to be playing again. I am back at 100 percent," said Goetze, who missed a golden opportunity himself before Mueller scored the winner.
Mueller had come close several times earlier in the game and drilled home the winner at the far post in the 75th after Hoffenheim failed to clear a Goetze charge.
Bayer Leverkusen suffered a surprise 1-0 defeat at promoted Eintracht Braunschweig and stayed in third place.
Borussia Moenchengladbach tightened their hold on fourth place thanks to in-form Germany striker Max Kruse, who scored both goals in their 2-0 win at Hamburg.
The win kept them two points ahead of Schalke 04, who leapfrogged Hertha Berlin into sixth place with a 2-0 victory in the capital as Schalke's Kevin-Prince Boateng faced his former club.
Schalke travel to Chelsea in the Champions League next week.
VfL Wolfsburg cruised to fifth with their third straight win as teenager Maximilian Arnold netted an 82nd-minute winner against the run of play in their 2-1 victory over Eintracht Frankfurt.
Freiburg finally grabbed their first win of the season, beating Nuremberg 3-0 and climbing off the bottom spot and into the relegation playoff place.
(Reporting by Karolos Grohmann, editing by Stephen Wood)