The 21-year-old scored in the 3-1 win at the Allianz Arena but confessed his side feared a repeat of their Manchester City slip-up when Pierre-Michel Lasogga hit a late goal
After Mario Mandzukic had opened the scoring at the Allianz Arena just before the break, Gotze doubled the hosts' advantage shortly after half-time only to see Pierre-Michel Lasogga's strike just three minutes from the end of normal time set up a tense finale.
Xherdan Shaqiri ultimately sealed the points for Bayern right at the death but, after throwing away a two-goal lead in their midweek Champions League defeat at home to Manchester City, Gotze admitted that Bayern had again feared the worst.
"It wasn't easy against Hamburg, who defended very deeply," the attacking midfielder was quoted as saying by the official Bundesliga website. "The opening goal was very important for us.
"We got a little bit nervous after their goal, but I think we can be pretty pleased with the result."
Bayern now turn their attentions to the Fifa Club World Cup and Gotze says the squad is buzzing ahead of their trip to Morocco.
"None of us have ever been to the Club World Cup," the Germany international enthused. "We're looking forward to it and we want to do the best we can at the tournament."