The Americans, who haven't taken Olympic gold since 1980, booked a last-eight matchup on Wednesday against the undefeated Czech Republic, who seek their first gold in 20 years.
Later qualifying games Tuesday include South Korea against Finland, Slovenia against Norway and Switzerland against Germany.
Also already into the quarter-finals are the Olympic Athletes from Russia, two-time defending champion Canada and unbeaten Sweden.
Donato, who also netted two goals against Slovakia in a 2-1 US group-stage victory, blasted a rebound into the far top corner 96 seconds into the second period to put the USA ahead 1-0.
Slovakia responded 26 seconds later with a body-slamming retaliation sequence as Michal Cajkovsky was sent off for 25 minutes for a blow to Donato's head at the same time Ladislav Nagy was whistled for flattening US goaltender Ryan Zapolski.
That gave the Americans a two-man power play and they converted just 18 seconds into it when James Wisniewski, a German League defenceman whose father Jim was quarantined with the norovirus, scored to provide a 2-0 US edge.
US college star Troy Terry collected his third assist with 6:30 remaining in the second period, his centering pass blasted home by Mark Arcobello for a 3-0 US lead.
Slovakia responded on a power-play goal by Peter Ceresnak with 3:06 remaining in the second but Garrett Roe answered for the US squad with 10:08 remaining and Donato tucked the puck inside the near post with 3:14 remaining to create the final margin.