Also in Group F, Michael Wolf and Michael Hackert scored in Germany's 2-0 upset of the Czech Republic, the Germans' first victory over the Czechs in the world championships since 1986.
In Group E, Johan Davidsson scored the winning goal on a power play midway through the second period to lift defending champion Sweden to a 5-2 win over Denmark. Chicago Blackhawks centre Tuomo Ruutu scored the winner in the third period and Finland beat Switzerland 2-0.
Slovakia pressured the United States early in the opening period, outshooting the Americans 18-7. Strong goaltending by the Carolina Hurricanes' John Grahame, who finished with 29 saves, prevented Slovakia from converting.
"Fortunately for us John Grahame probably had his best game of the tournament so far," United States coach Mike Sullivan said. "He made some critical saves that allowed us to get in the game."
The United States scored first 8:17 in when Hurricanes defenceman Andrew Hutchinson sent a slapshot from inside the blue-line that beat Slovakia goaltender Karol Krizan.
The Americans were down a man when they went up 2-0 after St. Louis Blues centre David Backes stole the puck and skated down to backhand a high shot past Krizan at 12:27.
Slovakia answered 41 seconds later when Marek Uram made a perfect pass to Bruins defenceman Zdeno Chara, who flicked it past Grahame at point-blank range.
Kessel scored 4:52 into the second period to put the United States ahead 3-1. Bochenski backhanded in his own rebound on the power play during a goal-mouth scramble at 12:37.
"It helped that we had a day off and they came in tired," Bochenski said. "We knew we had to get in their face and play high energy from the start and the first two periods we did that."
Minnesota Wild winger Marian Gaborik beat Grahame for Slovakia's other goal.
The United States faces Germany on Saturday, when the Slovaks will take on the Czechs.
Ruutu scored for Finland when he picked up a rebound and tapped it between the pads of Swiss goalie Jonas Hiller at 11:37 of the third period.
Finland captain and Florida Panthers forward Ville Peltonen added an empty-net goal in the final minute.
Atlanta Thrashers goalie Kari Lehtonen made 18 saves for Finland.
Finland's plays Italy on Saturday, and Switzerland takes on Denmark.