Joe Bergeron ran for five touchdowns, pushing Texas to the win in another frantic game in a Big 12 that seems to provide heart-pounding, high-scoring action every week.
Bergeron called the previous week's 63-21 humiliation at the hands of Oklahoma a "wake-up call" for the Texas season.
"Our mindset going through this week was we need to re-establish ourselves as a football team," said Bergeron, who fell one touchdown short of the school record held by Heisman Trophy-winning running back Ricky Williams.
Texas quarterback David Ash passed for 274 yards for the Longhorns (5-2, 2-2 Big 12), who earned their third Big 12 home win since 2010.
Baylor's Nick Florence passed for two touchdowns and ran for two, but the Bears (3-3, 0-3) missed a chance to get a third straight win over Texas for the first time in a rivalry dating to 1901.
Texas led 42-31 at halftime and the game was on pace to beat the Big 12 record total of 133 points set when Baylor lost 70-63 to West Virginia on Sept. 29.
"Our offense had to score when we had it. It got to be who had the ball last," Texas coach Mack Brown said. "This is the offense we want. It's who we want to be."
The Bears and Longhorns combined for 1,132 yards, 56 first downs and 14 touchdowns, and the Longhorns gave up more than 600 yards for the second consecutive week in a performance that won't ease the pressure on second-year defensive coordinator Manny Diaz.
The bright spot for Texas was holding Baylor to field goals instead of touchdowns on three scoring drives in the second and third quarters which made a huge difference in the end.
"We asked them to fight tonight and I thought they did," said Diaz, who has heard Longhorns fans calling for him to be fired as his defense has surrendered at least 48 points the last three games. "Right now this football team just has to find a way to win. That's what we needed."
The game wasn't settled until Texas recovered a pooch kickoff with 1:57 left after Florence scored his second touchdown. Bergeron converted a critical third-and-1 that helped Texas run out the clock.
Baylor has scored 113 points in its two Big 12 road games this season and lost both by a total of 13 points.
"It's not the defense's fault," Florence said. "The score doesn't really matter, it's the fact that we lost the ball game."
The game was played at a blistering pace in the first half as both teams marched at will against defenses desperate just to make tackles.
Texas freshman running back Daje Johnson scored on an 84-yard run on the first play. Like everything else the offenses did, Johnson made it look simple by bouncing a run outside and gliding untouched to the end zone.
"We wanted to score on the first drive and not only did we do that, we scored on the first play. That got the crowd started and set things going forward," Brown said.
Bergeron scored on runs of 15, 2, 9 and 4 yards in the first half and Texas scored 28 points in the second quarter. Florence passed for two scores and ran for another before Texas took a 42-31 lead into halftime.
"I just see the goal line, just give me a crease and I roll with it, I just hit it. If anybody comes into that vision, you punish them," Bergeron said.
Florence connected with Terrance Williams for an 80-yard touchdown pass and his 7-yard toss to Lanear Sampson gave Baylor a 28-21 lead. But Florence floated a pass that was intercepted by Texas' Josh Turner in the second quarter. The turnover set up a 25-yard touchdown run by Longhorns freshman Johnathan Gray.
On the opening drive of the third, Baylor marched inside the Texas 10. Florence tried to run and fumbled, but the ball rolled into the end zone for Baylor tight end Jordan Najvar to recover for a touchdown.
Baylor forced a punt on Texas' first possession of the third, but had to settle for a field goal by Aaron Jones that cut the Texas lead to 42-40 instead of pushing for a touchdown. Texas struck quickly with Ash throwing 67 yards to Mike Davis to set up Bergeron's fifth touchdown, this time from 8 yards out, to make it 49-40.
The Texas defense forced another Baylor turnover at the end of the third when Glasco Martin fumbled at midfield. Texas capped the short drive with Ash's first touchdown pass of the game, a 15-yard strike to Davis, and Texas led 56-43 with 12 minutes to play.