Late goals from 35-year-old veteran Claudio Pizarro and substitute Mario Mandzukic saved Bayern's blushes against the last-placed hosts but their overall performance was again far from convincing.
Peruvian Pizarro, who has now scored against every Bundesliga club with Braunschweig the only one missing from his list prior to the game, was picked to start ahead of Bayern top scorer Mandzukic.
The choice proved key as the Bavarians' slump in form showed for much of the game and needed the goal prowess of the league's top foreign scorer of all time.
Rivals Borussia Dortmund secured a Champions League spot after a 4-2 win against Mainz 05 guaranteed them a top three finish.
Former European champions Hamburg SV edged closer to their first ever Bundesliga relegation after crashing to a 3-1 defeat by visitors VfL Wolfsburg, who leapfrogged into fourth place and into Champions League contention with three games left.
Guardiola was satisfied with the way Bayern came back after a draw and two consecutive league losses in their last three matches but warned next week's clash in Spain would demand from Bayern their top performance.
"It has not been easy for us since securing the league title but today we kept on fighting despite a difficult situation," Guardiola told reporters.
"We won and I am happy with it but don't expect us to make the Champions League final if we do not offer an outstanding performance against Real Madrid."
Bayern, who secured the league title weeks ago, were missing several players including goalkeeper Manuel Neuer and defender David Alaba.
Despite enough big name players in the squad, however, they struggled against the aggressive hosts, out for any points to avoid relegation.
Braunschweig, missing Karim Bellarabi and Marcel Correia who were suspended by coach Torsten Lieberknecht after oversleeping and missing the team's breakfast on Saturday, were far livelier despite the absence of injured top striker Domi Kumbela.
It took Bayern more than an hour to settle in and Pizarro drilled home from a tight angle after a well-timed pass by Mario Goetze. Substitute Mandzukic settled any nerves in the 86th.
Dortmund made sure of Champions League action again next season after tightening their grip on second place with their win over Mainz to open a six-point lead over third-placed Schalke 04, who take on VfB Stuttgart on Sunday.
Dortmund, who hit the post through in-form Marco Reus in the third minute, did better two minutes later with Milos Jojic's deflected shot.
Twice Mainz 05 recovered with goals from Japan international Shinji Okazaki but twice the hosts hit back almost instantly with Robert Lewandowski's 18th goal of the campaign and another from fullback Lukasz Piszczek.
Lewandowski, in his penultimate home game for Dortmund before joining Bayern next season, then forced Niko Bungert to use his hands to stop the ball in the box.
Bungert was sent off and Reus, who twice hit the woodwork with free kicks in the game, converted the spot kick to clinch their fourth consecutive league win.
Former Bundesliga champions Werder Bremen all but secured another season in the top division after beating Hoffenheim 3-1 to move nine points away from the relegation playoff spot with three games left.
Freiburg also took a major step towards safety, coming from a goal down to beat 10-man Borussia Moenchengladbach 4-2 and move up to 35 points.
Gladbach saw their chances of Champions League action next season severely dented after they dropped to sixth, two points off fourth place that leads to the qualifying rounds of Europe's top club competition.
For Hamburg, time is running out after their loss to Wolfsburg.
The only Bundesliga team never to have been relegated, they remain in the relegation play-off spot, a point ahead of Nuremberg in 17th, who are in action against Bayer Leverkusen on Sunday. Braunschweig are 18th on 25 points.
- Sports & Recreation
- Mario Mandzukic
- Borussia Dortmund
- Claudio Pizarro