Germany outshot the United States 30-29 but, with Gibson in fine form in front of the net, Bobby Butler, Paul Stastny and Stephen Gionta netted the goals that helped the Americans progress. They now have the chance of an outright group victory in their final game against Slovakia on Tuesday.
In the late game in Helsinki, Alexander Radulov had a goal and an assist as Russia returned to winning ways, beating Slovakia 3-1 after consecutive losses to France and Finland.
The United States lead the Helsinki group on 15 points, with Finland a point further back and Russia third on 12.
Slovakia and Germany are both on seven points and battling for the last quarter-final place, with the Slovaks currently holding the upper hand on goal difference.
In Stockholm, Switzerland maintained their perfect record, making it six wins out of six with a 3-1 victory over Norway. The Swiss racked up 37 shots on the Norwegian goal, with Simon Moser, Roman Josi and Patrick von Gunten all netting.
A Jeff Skinner goal for Canada in the early game in the Swedish capital gave his side a 2-1 win over the Czech Republic, leaving the latter in fifth place in their group and perilously close to missing the quarter-finals.
With the top four from each group going through to the quarter-finals, the Czechs must now beat Norway in their final group game on Tuesday to qualify.
Switzerland top the group on 17 points, ahead of Canada (14) and co-hosts Sweden (12). Norway are fourth on nine, one point ahead of the Czech Republic.
- Sports & Recreation