Austin Daye made five free throws in the final 27.8 seconds to seal the 19th-ranked Bulldogs' 78-73 victory on Saturday night, their 11th in 12 games.
Gonzaga (19-5, 10-0 WCC) was hardly celebrating.
"We didn't play inspired by any stretch, which is unfortunate," Gonzaga coach Mark Few said. "But we got through it."
Dior Lowhorn scored 23 points to lead the Dons (9-17, 1-10), who have lost four straight and were playing without four suspended players.
But they made a season-best 14 3-pointers in 22 attempts, including nine in the second half.
Blake Wallace had 19 points and Kwame Vaught 15 for San Francisco.
Daye had 17 points and nine rebounds, Demetri Goodson had 13 points, Jeremy Pargo 12, Matt Bouldin 11 and Josh Heytvelt 10 for the Bulldogs.
"We didn't overlook them," Daye said. "We just didn't get out on their 3-point shooters and made some really dumb turnovers early. Other than that we didn't play poorly. San Francisco just played really well.
"We would have been fine if not for those silly bonehead turnovers early."
San Francisco played without second-leading scorer Manny Quezada, James Morgan, Hyman Taylor and Chioke Walker for the second straight game. They were suspended by coach Rex Walters earlier this week.
None of the four suspended players was on the bench Saturday night.
"It's hard enough to defend those guys with all the horses they have," Lowhorn said. "But with basically seven guys we just ran out of juice."
Gonzaga won the previous meeting between the teams 85-51 on Jan. 17 in Washington, San Francisco's most lopsided loss this season.
San Francisco tied it once in the second half 49-49 on a 3-pointer by Lowhorn. But Micah Downs came right back with a 3-pointer with 16:05 remaining and the Bulldogs led the rest of the way.
A 9-0 run starting with 8:10 remaining gave the Bulldogs a 70-59 lead.
San Francisco drew to 77-73 on a 3-pointer from Wallace with 16.8 seconds left. Daye made one of two free throws with 4.6 seconds left to seal the win.
"I haven't been shooting free throws that well, so that felt good," said Daye, who was 6-for-7 from the line.
Despite 65 percent shooting, Gonzaga led just 41-37 at halftime due largely to some shoddy ball-handling and the play of Lowhorn.
The Bulldogs made 17 of 26 shots, including a combined 10 of 11 by Goodson and Heytvelt, but they committed 12 turnovers and Lowhorn score 15 points.
Gonzaga turned it over on its first four possessions and didn't take its first shot until 3:37 into the game, when Downs made a 3-pointer. It started a 19-4 run and the Bulldogs appeared in control.
But Lowhorn kept San Francisco within range and, fittingly, Gonzaga ended the half with a turnover when Blake Hernandez made a steal underneath the Bulldogs' basket and converted a basket with 18 seconds left, cutting the lead to 41-37.