The Bruins (9-3, 6-3 Pac-12, No. 16 CFP) finished with 541 yards of offense, including 352 on the ground, and rebounded from a narrow defeat to USC the previous week that eliminated them from league title contention.
Thompson-Robinson passed for 189 yards and gained another 88 on the ground. Zach Charbonnet rushed for 119 yards and a score, and he converted a fourth-and-2 run in Cal territory late in the game that chewed up valuable time. TJ Harden added 89 yards rushing on 12 carries for the Bruins.
It was Thompson-Robinson's ability to improvise when plays broke down that keyed UCLA's surge after it fell behind 21-10 late in the second quarter.
''That's Dorian,'' UCLA coach Chip Kelly said. ''He can beat you with both his arm and his legs. He's a threat. Everybody knows it.''
The Bears (4-8, 2-7) got a fourth-down stop that gave them the ball back trailing 35-28 with 1:58 remaining. But Bruins linebacker Kain Medrano knocked the ball loose from Jaydn Ott after a fourth-down reception that would have converted a first down, and Carl Jones Jr. recovered to ice the game for UCLA.
Cal's Jack Plummer threw for 294 yards and four touchdowns. Jeremiah Hunter had eight catches for 153 yards and two scores.
UCLA trailed by 11 with 58 seconds left before halftime. But Thompson-Robinson led his team on a 75-yard drive that took 40 seconds, capping it with a 19-yard touchdown scramble that brought UCLA within 21-17 at the intermission.
''Obviously we were a little frustrated, a little teed off. We're a lot better football team than that,'' Thompson-Robinson said. ''But again, the resiliency and ability to fix those things. We've got a bunch of smart football players out on that field. If we need to make adjustments, we make adjustments.''
UCLA scored on its first possession of the second half to take the lead. But Plummer hit Ott for an 8-yard touchdown that put Cal up 28-27 with 11:16 remaining.
Then Thompson-Robinson engineered a 73-yard scoring drive capped by Charbonnet's 5-yard touchdown. A 2-point conversion pass to Jake Bobo gave UCLA a 35-28 lead.
UCLA had 113 rushing yards in the first quarter alone and moved the ball at will. But Nicholas Barr-Mira missed a 33-yard field goal, and penalties forced the Bruins to settle for a field goal on another drive. They led 10-7 midway through the second quarter.
That gave Plummer time to find his rhythm. The transfer from Purdue threw three first-half touchdown passes, including two to Hunter, who beat one-on-one coverage for 38- and 22-yard scores.
Cal safety Daniel Scott, who played his final college game after six years in the program, said the Bears couldn't make enough key plays throughout the season to qualify for a bowl game.
''It's been a challenging year with ups and downs,'' Scott said. ''At the same time, you've got to look at the positives. We played a lot of close games. It's just the small details that cost us some games.''
UCLA: The Bruins kept their poise and leaned on their ground game, ultimately wearing down an opponent that couldn't match up on paper.
California: The Bears had control of the game late in the first half, but allowing the Bruins to score quickly before halftime snatched away what momentum they had built.
Thompson-Robinson, a senior whose athleticism makes him an intriguing NFL prospect, said he hasn't decided whether he'll play in UCLA's bowl game.
''To be determined,'' he said. ''Some things go into that. I have to talk to my family and my agent and all that stuff.''
Plummer, a senior who transferred to Cal from Purdue before the season, has a season of eligibility left and said he will probably decide in the next two weeks whether to return.
STARKEY'S FINAL CALL
Cal radio broadcaster Joe Starkey worked his final game after 48 seasons. Starkey is best known for his call of ''The Play,'' Cal's multi-lateral touchdown on the last play of its 1982 win over Stanford.
Starkey was on the field for Friday's pregame coin toss. He was also honored during last week's win over Stanford, which marked the 40th anniversary of The Play.
''Very emotional. I've been there for a very long time,'' Starkey said after Friday's game. ''We've gone to some wonderful places. I've done college games, for God's sake, for Cal in Tokyo and Australia. What a way to spend a life. I've been so lucky to be able to go to those places and be part of it.''
UCLA: Awaits a bowl invitation.
California: Failed to reach last season's total of five wins.
AP college football: https://apnews.com/hub/college-football andhttps://twitter.com/ap-top25. Sign up for the AP's college football newsletter:https://tinyurl.com/mrxhe6f2
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.