At a news conference in Seattle, Gregoire said she would not declare victory yet.
"Keep the faith," she told cheering supporters. "The election process is working exactly as it should."
King County, a Democratic stronghold and the last county to finish counting ballots, is expected to certify its results today, but it appears the courts ultimately will have to decide who won.
Republicans vowed to seek out Rossi voters whose ballots were disqualified and said they will fight to have those votes counted.
"This battle is not over," state GOP chairman Chris Vance said. "This election is not over."
The ruling and the recount results were explosive twists in the roller-coaster race, which was supposed to have been settled Nov. 2.
Gregoire, 57, a three-term attorney general, was the favorite going into the election against Rossi, 45, a real estate agent and former state senator.
But out of 2.9 million ballots cast on Election Day, Rossi won by 261 votes over Gregoire. His lead was whittled to 42 votes in a subsequent machine recount.
Democrats paid $730,000 for the hand recount, though by law the state has to repay the party if the recount reverses the results.
"There is a sacred American right to have legitimate votes counted," Gregoire said in a news release after the ruling. "The justices recognized that principle today."
At a hearing yesterday morning before the high court, Republicans had argued that a recount should be a mere retabulation, and that it was too late for counties to go back and correct errors.
But the court unanimously said state law and previous court rulings specifically allow county canvassing boards to correct mistakes during a recount.
Justices questioned Republican claims that counting the votes would cause irreparable harm.
"You're looking at it from the point of view of the winner or the loser -- shouldn't we be looking at it from the point of view of the voter?" asked Justice Susan Owens.
Democratic State Party chairman Paul Berendt called on Republicans Tuesday to concede, "for the good of the state."
Not so fast, Republicans said.