The home streak for the Bulldogs (16-4, 5-1 West Coast Conference) had been the eighth longest in Division I history. It included a Nov. 20 win over Kentucky in a neutral-site game at Spokane Arena, which the NCAA considered a home game for Gonzaga.
Shelton scored 27 points to lead the Lions (14-7, 4-3), who hadn't won in Spokane since 1991 and had lost 25 straight to the Zags.
"For us, it's another sign that our program is moving in the right direction, and that's the biggest thing," Loyola Marymount coach Stan Johnson said. "Not too many people are going to come up here and win, so I think it just stands and validates the guys we have in the locker room and all the things we've been trying to accomplish."
Gonzaga had won 83 straight games against unranked opponents with 46 of those coming at home.
"The home streak is over," Zags coach Mark Few said. "It was going to end sometime and it ended in a tough, hard-fought battle. Our guys battled back and had a shot to keep it going. ... I don't think anybody is going to touch that [streak] for quite some time."
The Bulldogs' streak of 36 straight wins in the month of January also ended. They had won 11 straight overall since losing to Baylor on Dec. 2.
LMU led 66-59 with 2:55 left after Shelton's 3-pointer, but the Zags scored the next eight points to take a 67-66 lead on Drew Timme's free throw with 41 seconds left. With the shot clock running down, Shelton converted a runner from just outside the lane to give the Lions the lead, and Timme's last attempt at a winner was partly blocked by Leaupepe.
Shelton's savvy play was crucial for the Lions in the closing minutes.
"Cam's had a really tremendous year thus far and I thought he put pressure on them getting in the paint," Johnson said. "I thought he made some good decisions finding his guys and I thought he had great poise, and that's what you want from a veteran point guard."
Timme led the Zags with 17 points. Nolan Hickman chipped in 12 points and six assists for the Zags, who were coming off a 115-75 win over Portland on Saturday.
Gonzaga struggled from the field, shooting 44.4% overall and going 4-of-14 (28.6%) from 3-point range and 15-of-23 (65.2%) from the free throw line.
The Associated Press contributed to this report.