The game came to life in the second quarter with Tom Grambusch and Marco Miltkau netting for the hosts.
Ireland hit back quickly through Shane O'Donoghue's close-range finish and Alan Southern swept into the German net to level on 30 minutes.
Eugene Magee finished a fine team move to make it 3-2 before Sean Murray tapped in to seal victory.
There was very little to differentiate the two sides in the opening half and the teams went in level at half-time.
Grambusch got the scoreboard ticking in the 19th minute with a fine drag flick to David Harte's left.
Moments later Moritz Trompertz forced a turnover and sent a reverse shot towards goal for Marco Miltkau to get the faintest of touches to take it past Harte.
But 30 seconds later O'Donoghue brought Ireland back into it as he deflected in a shot from close range to leave Tobias Walter with no chance.
Murray did well as he drew Walter before releasing the pass to Sothern on the penalty spot, who slotted into an open goal to equalise.
Magee put Ireland in front in the 34th minute with a phenomenal goal that started with Paul Gleghorne rifling the ball into the sky for O'Donoghue to snatch at pace and fire across the circle to Magee.
Germany continued to rack up the chances and had no fewer than six penalty corners but their shots went either wide or were calmly dealt with by the Green Machine defence.
The game was put to bed by Murray two minutes after Germany had taken off their goalkeeper as he tapped into an open goal.
Ireland opened the tournament with a 4-1 win over Spain before hammering Austria 7-2 on Friday.
Germany: T Walter, M Muller, L Windfeder, M Trompertz, T Herzbruch, JP Rabente, T Grambusch, C Ruhr, M Zwicker (Captain), B Furk, N Wellen.
Subs: J Gomoll, TO Prinz, DE Linnekogel, M Miltkao, J Meyer, F Weinke, M Appel.
Ireland: D Harte, J Jackson, J Bell (Captain), C Cargo, A Sothern, E Magee, S O'Donoghue, J McKee, P Gleghorne, S Loughrey, S Cole.
Subs: J Carr, M Bell, M Nelson, N Glassey, S Murray, J Duncan, L Cole.
Ireland fought back from two goals down to beat Germany 4-2 and secure the Hamburg Masters title on Sunday.