The Cougars (9-2, 6-1) entered Saturday third in the Bowl Championship Series standings and still had a chance to play for the national championship if top-ranked Miami stumbled in one of its last two games.
But those hopes were dashed when the Cougars squandered a 10-point lead in the final 3:13 of regulation and were unable to move the ball in overtime. Washington State's fortunes went south soon after Jason Gesser, a Heisman Trophy candidate, went down with a right leg injury.
Kegel threw a costly interception that set up the game-tying field goal at the end of regulation and was unable to move the Cougars in overtime.
Anderson seized the opportunity with five field goals, including kicks of 34, 46 and 49 yards in overtime. He also converted from 35 and 27 yards to atone for misses from 50, 51 and 34.
Washington State had one last chance in overtime when Kegel tried a backwards pass toward the left sideline. Ellis batted down the pass and recovered the fumble, sealing the win for Washington.
Gesser was 14 of 24 for 226 yards while Kegel was five of seven for 20 yards.
It has been a disappointing season for the Huskies (7-5, 5-2), but Saturday's triumph assured them a 26th straight non-losing season.
Washington coach Rick Neuheisel improved to 5-0 against the Cougars, including a 4-0 mark as Huskies coach. Mike Price of Washington State fell to 3-11 against the Huskies.
The teams exchanged field goals in the first two overtime periods as Drew Dunning of Washington State connected from 42 and 32 yards.
Cody Pickett completed 35 of 57 passes for 368 yards and one touchdown and irected a pair of late scoring drives to send the game into overtime.
Reggie Williams a made spectacular leaping catch of a pass from Pickett for a 48-yard gain, leading to a seven-yard touchdown pass over the middle to Paul Arnold with 3:13 left.
With Gesser sidelined, Kegel forced a long pass that was intercepted by Dave Robinson at the Cougars 35-yard line.
Pickett completed passes of nine yards to Patrick Reddick and 10 yards to Williams to give the Huskies a first and goal, but Washington settled for a game-tying 27-yard field goal by Anderson with 15 seconds left in regulation.
Celebrity Families of 2014 [PHOTOS]