Stephen Holt had 15 points and Brad Waldow 14 for Saint Mary's.
Gonzaga and Saint Mary's have been familiar foes in the WCC tournament, meeting for the sixth straight season.
This one was a little different; they were playing in the semifinals instead of the championship game for the first time during that stretch.
Gonzaga entered the tournament with a somewhat-shaky NCAA tournament resume after late-season losses to BYU and San Diego. The Bulldogs won the WCC regular-season title for the 15th time in 17 seasons and ran over Saint Mary's in the finale, 75-47 for the most lopsided game in the series since 2001.
But Gonzaga was far from stellar in its WCC tournament opener, trailing sub-.500 Santa Clara most of the way before pulling out a 77-75 victory on Stockton's layup with 2 seconds left.
Saint Mary's had it a little easier in its opener, rolling over Pepperdine 80-69 behind Waldow's 21 points. But Gonzaga has been a tough matchup for the Gaels, particularly on the offensive end.
Saint Mary's lost the first game to the Zags by 22 points and shot a combined 27 percent, including 6 of 30 on 3-pointers, in the two games combined.
The Gaels continued to struggle against Gonzaga's quick-rotating defense, throwing the ball away and putting up difficult shots.
Saint Mary's didn't crack double figures until Waldow scored on a layup with 5:32 left in the first half and, even making a few shots down the stretch, went 9 for 23 from the floor to trail 31-20.
The Gaels made a brief run to open the second half, pulling within 33-27 on Kerry Carter's 3-pointer.
Gonzaga clamped back down and, keyed by a 3-point by Stockton, pushed the lead back to 13. Saint Mary's tried to mount a couple of runs, but had trouble finishing at the rim against Gonzaga's big men to get much closer.
IPFW 64, S Dakota St 60 • In Sioux Falls, S.D., Mo Evans came off the bench to hit 6 of 7 3-pointers and scored 18 points as second-seeded Indiana-Purdue-Fort Wayne knocked out two-time defending champion South Dakota State in the semifinals of the Summit League tournament.
The Mastodons (24-9) play top-seed North Dakota State on Tuesday.
Evans hit all five of his 3's in the first half as IPFW opened a 30-24 lead but the Jackrabbits (19-12) scored the first seven points of the second half.