Corentin Tolisso's second goal of the season was enough to earn Bayern a third successive triumph under Jupp Heynckes and leave the hosts winless in seven.
The Bavarian giants stay second in the table, but they now only trail Dortmund on goal difference after Peter Bosz's side let a two-goal lead slip to draw away at Eintracht Frankfurt earlier in the day.
Bayern beat Freiburg 5-0 and Celtic 3-0 in their previous two outings but came up against a Hamburg side that proved tough to break down until Gideon Jung was sent off for a lunge on Kingsley Coman six minutes before half-time.
Tolisso struck seven minutes into the second half and the champions shut the door on Hamburg, with only the upright denying the France midfielder a second as Heynckes's 100 per cent record remains intact.
Bayern bossed the early stages of the game but failed to threaten Hamburg's goal until Arjen Robben cut inside from the right and had a curling shot blocked on its way towards the bottom-left corner after 13 minutes.
Coman's neat turn and chipped pass into the box gave Robben another sight of goal seven minutes later, but his left-footed shot hit the side-netting.
While Bayern were untroubled at the back in the first half, they struggled to break down a packed Hamburg defence and failed to register a shot on target before the interval.
However, their chances were boosted when Hamburg midfielder Jung needlessly brought down Coman by the halfway line and was shown a straight red card.
Arturo Vidal might have put Bayern ahead two minutes after the restart had his 20-yard shot not deflected wide off the leg of Kyriakos Papadopoulos, and the visitors – who sent Thomas Muller on for James Rodriguez at half-time – continued to press for a breakthrough.
The moment arrived when an innocuous-looking cross from Coman evaded a row of Hamburg defenders before Rick van Drongelen fluffed his lines and Muller touched the ball on to Tolisso, who side-footed home.
Andre Hahn fired a loose ball towards the top-right corner as Hamburg sought a rapid equaliser but his shot was tipped over by Sven Ulreich at full stretch.
Thiago Alcantara crashed a curling shot onto the post after a Robben corner in the 70th minute and Mats Hummels narrowly headed off target as the tension rose.
Hamburg poured forward in the closing stages in the hope of restoring parity but Bayern's numerical advantage ensured there was no way through for Markus Gisdol's men.
It would have ended 2-0 had Christian Mathenia not made an excellent save at Robben's feet, while the post denied Tolisso a second with a header from a corner.
As full-time edged closer Robben met Coman's cross with a sublime volley that fizzed past the upright, but Bayern were not to be denied an important victory.
Key Opta stats:
- Jupp Heynckes has won 18 of his last 19 competitive games as coach of Bayern Munich plus one draw against Borussia Dortmund in May 2013 (1-1).
- Hamburg have not won any of their last seven matches in the Bundesliga (one draw, six losses). The last time they had a longer winless streak in the Bundesliga was at the beginning of last season (12 games, four draws, eight losses).
- For the first time in their league history, Hamburg have failed to score in four consecutive home games.