Stewart, playing in his last home game as a Trojan, made the 219th 3-pointer of his college career in the second half to break Brandon Granville's record. He added No. 220 late in the game and finished 4-for-7 from behind the arc, with 13 points and seven rebounds.
Gibson went 7-for-11 from the field and Dwight Lewis shot 5-for-7 for 14 points.
The Trojans (21-8, 11-5 Pac-10) held onto sole possession of third place in the conference and closed out the first season at their new Galen Center arena with a 15-3 home record.
Nick Young, a junior who may be leaving USC for the NBA, added 13 points.
USC pushed the lead into double digits several times, but the Bears' 3-point shooting kept them in it early in the second half.
Ubaka's 3-pointer with 8:34 to play pulled Cal within 61-54, but USC answered with an 8-2 run to take a 13-point lead.
A Gibson rebound and dunk over Young and an inbound alley-oop layup to Lewis completed the run and put the Trojans up 69-56.
Young and Lewis hit 3-pointers soon after to take the lead 73-58 with 4:45 remaining and USC cleared the bench of its seniors.
In a rare appearance, senior captain Chris Penrose hit a 3-pointer in the closing seconds in just his third 3-point attempt of the year -- and was carried off the court by his teammates.
The win may have guaranteed USC a spot in the NCAA tournament and could put the Trojans back in the Top 25.
Gibson, the only Trojan to start every game this season, had been struggling recently with tendinitis in his knee and had seen his point totals waning before Saturday.
Stewart, who came into the game two short of Granville's record, tied it with 13:10 to play in the first half then broke it with 13:12 to play in the second.
Cal made its first three 3-point attempts to open the game with a 9-2 lead. But USC later used its own 9-2 run, capped by a 3-pointer from Lewis, to go up 21-14.
Gabe Pruitt made a short jumper and a breakaway dunk then assisted Gibson on a three-point play as USC took a 10-point lead 37-27 with 1:05 remaining in the half.
Omar Wilkes added 12 points on 5-for-8 shooting for the Bears, who had won two of three coming into the game after a six-game losing streak.