Hamburg bag victory before Bundesliga break
Gladbach, who are anchored in last place with 10 points from 17 games, twice came close early on with Michael Bradley and a 40-metre Juan Arango lob that sliced just wide of the post.
Hamburg, now in eighth place with 24 points, then took the lead when Eljero Elia slotted in from 12 metres in an explosive start to the second half.
The hosts levelled in the 48th minute when Igor De Camargo met a Bradley cross to head in but Piotr Trochowski fired in a free-kick in the 72nd minute to offer Hamburg coach Armin Veh some respite.
The defeat will be a further blow for Gladbach coach Michael Frontzeck, already under great pressure after a disappointing first half of the season.
Following the weekend matches, the league will resume on January 14.