The Longhorns (9-4) never led before Goodwin scored his second touchdown on a deep post pattern, just a play after Texas converted a fourth-and-1 play to keep its chances alive.
Storm Woods ran for 118 yards and scored two touchdowns for Oregon State (9-4). The Beavers left stunned after looking as though they would wrap up their first 10-win season since 2006.
The victory was a dose of much-needed good news for Texas after coming into the game under a cloud of questions following the suspensions of two players.