The five-time European champions kicked off at the Allianz Arena having scored 18 goals in their last three Bundesliga games, but it took them until first-half stoppage time to make the breakthrough thanks to David Alaba's free-kick.
Mario Gotze doubled the advantage shortly into the second half, but, despite monopolising possession and incessant pressure, Bayern were unable to extend their lead.
Guardiola, whose side are now in the quarter-finals, said: "I kept getting asked, 'How many goals will you score: five, six, seven?'; today was a good demonstration that one should always have respect for your opponents.
"I knew how difficult this competition was. Braunschweig made it great. There is a little less quality in the second division, but they have heart.
"We were not physically in great shape, but we have got the job done anyway. I am satisfied, we are in the next round."
Alaba, who has scored in all three of Bayern's games in this season's DFB-Pokal, praised Braunschweig's resoluteness.
"Braunschweig were very aggressive, very good in defence, and they made it really hard for us," he said. "We dominated the game, but we struggled to find the gaps in their defence.
"We were nevertheless deserved winners. We showed that we are very ambitious and hungry to realise our goals."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.