The goal came 5:10 after Steve Kelly tied the game with a short-handed goal for Canada.
Francois Methot got the Canadians on the board with a short-handed goal at 8:26 of the first period.
Canada took a 2-1 lead with Jamie Pollock's power-play goal, and after surrendering a tying goal, Francois Bouchard put the Canadians ahead again 3-2.
The Germans would score twice in the second period to take a 4-3 lead into the third, setting the stage for Canada's third-period comeback.
Steve Kariya finished with three assists for the Canadians.