Sullivan, the embattled ASU quarterback, unleashed the pass after the Huskies, seemingly looking ahead to overtime, punted with 22 seconds left. Arizona State (4-2, 2-1 Pac-10) got the ball at the 50 and Sullivan took his shot downfield.
McGaha, who had missed practice all week with illness, somehow got behind the secondary of Washington (2-2, 3-4) and was wide open for the score.
It was the only catch of the night for McGaha and the longest completion of Sullivan's career. Coach Dennis Erickson has stuck with the senior Sullivan despite a sputtering offense and calls from critics for touted freshman Brock Osweiler.
Sullivan completed 21 of 35 for 263 yards and one big touchdown. He also had a 1-yard sneak for a score. Arizona State's other touchdown came on an end around play with Kyle Williams throwing to T.J. Simpson 32 yards for a touchdown.
The wild finish came a week after the Huskies beat Arizona on a freak play late in Seattle.
Washington's Jake Locker completed 22 of 38 for 279 yards, including a 49-yard touchdown pass on the Huskies' first possession. He was intercepted twice, the first at the Arizona State goal line in the first half and the second on his desperation throw at the finish.
There were 223 yards in penalties in the game, 12 for 124 yards against the Huskies, nine for 99 yards against the Sun Devils.
The Sun Devils outgained Washington on the ground 169-99, including a 75-yard run by freshman Cameron Marshall, Arizona State's longest running play in 24 games. That set up a 24-yard field goal by Thomas Weber that put the Sun Devils ahead 17-7 with 4:45 left in the third quarter.
Weber, one of the nation's best kickers when healthy, hadn't played since the season opener because of a groin pull. He missed from 42 and 40 yards in the second half.
The Huskies' running game, shut down most of the night, provided Washington's second score. Chris Polk spun away from a pack at the line of scrimmage and ran 23 yards for a touchdown that cut the lead to 17-14 with 1:18 left in the third quarter.
Yet another penalty, 15 yards against Washington's Adam Long for interfering with a player's attempt to catch a punt, gave ASU the ball at its 40 in the fourth quarter. The Sun Devils drove inside the Huskies 20, but Weber, still bothered by the groin injury, was wide right with his 40-yard try.
Washington took over and Locker completed passes of 21 yards to Aguilar and 34 to Jermaine Kearse to move the Huskies to the Arizona State 11, but the drive stalled and Eric Folk's 29-yard field goal tied it at 17 with 3:50 remaining.
The Huskies got the ball at their own 10 with 1:17 to play. They ran the ball twice but took a shot down the field on third-and-1, with the ball incomplete.
Arizona State's standout freshman linebacker Vontaze Burfict drew three personal fouls in the first half. The first came on third-and-10 from the Washington 35 on the Huskies' opening possession. Instead of punting, Washington had the ball on the ASU 49, and on the next play Locker found Devin Aguilar down the sideline for the score.
Miami Hurricanes sticking with quarterback Tyler Van Dyke despite rough outing vs. Middle Tennessee State
Miami head coach Mario Cristobal said Monday that Tyler Van Dyke would remain the starting quarterback despite being benched in the Hurricanes' 45-31 loss to Middle Tennessee State University two weeks ago.
Capital One Fan Vote: Which unbeaten top-10 team was most impressive Saturday?
Which unbeaten team caught your eye the most? Alabama, Clemson, Michigan or Oklahoma State?
College football Week 5 recap: Best highlights and takeaways
Week 5 brought us upsets, highlight-reel plays and major statement victories from some surprise unbeaten teams.
Who will make the College Football Playoff?
With help from the Allstate Playoff Predictor, you can play out the 2022 season and see how likely it is that top contenders will reach the College Football Playoff.
Paul Chryst fired: Who will replace Wisconsin's football coach?
Jim Leonhard is one of the top young defensive minds in college football. Will he take over full time at Wisconsin? Or could Wisconsin lure someone like Kansas' Lance Leipold or Baylor's Dave Aranda?
College football's biggest changes through the first five weeks of the season
The top three is still the top three, but plenty of teams have been better than we might have expected. Bill Connelly sorts it all out.