Peyton Henry matched his career-high with four field goals.
Stanford has lost three straight since knocking off then-No. 3 Oregon.
The Cardinal (2-4, 3-5) trailed most of the game before scoring 10 points in the fourth quarter to take a brief lead.
Quarterback Tanner McKee scored on a 1-yard dive and Joshua Karty kicked a 43-yard field goal that put Stanford up 13-12.
After Washington was called for a delay on the first play of its ensuing drive, the Huskies moved quickly downfield and appeared to be setting up for a field goal before Morris lofted a perfect throw to McMillan for the game-winning score.