Down a dozen points after three quarters, quarterback Bo Levi Mitchell threw a touchdown pass to Jock Sanders, Matt Walter scored his second major of the game on a two-yard scamper and defensive back Jamar Wall ran an interception back for a major.
Rene Paredes added an 18-yard field goal and the Roughriders also conceded a two-point safety in the quarter. Calgary's defence contributed to the comeback by intercepting Saskatchewan quarterback Kerry Joseph three times in the quarter.
The Stampeders (14-2) already had first place in the West Division sewed up heading into the game. The division final in Calgary is still a month away Nov. 23, so the challenge for the Stampeders is staying hungry.
Scrambling for the victory in a game that meant nothing to them in the CFL standings was an indicator they still are.
"It's a momentum-builder for sure," Walter said. "We don't want to make McMahon a place that other teams come in and win at, especially given that the West final is going to be here. We want to keep this as a very intimidating, hostile place."
Drew Tate also scored on a one-yard plunge for the Stampeders in front of an announced sellout of 35,400 at McMahon Stadium. After a slow start to the game, Mitchell completed 21 of 31 pass attempts for 231 yards and one touchdown pass.
After he was picked off for a touchdown by Brian Peters late in the first half, Mitchell countered on Calgary's next possession with a five-play, 63-yard scoring drive in less than a minute.
"Things aren't going to go your way all the time," Mitchell said. "Respond and finish, that's what we're preaching right now."
The 24-year-old improved to 15-1 in career CFL starts.
Saskatchewan (9-8) is playoff-bound and will be on the road in the post-season. The defending Grey Cup champions will either finish third in the West or be the crossover team in the East. The Roughriders lost their fifth in a row.
Joseph was 21-for-37 in passing for 322 yards and a pair of touchdown passes, but the three picks were costly. It was the 41-year-old's second start for the Roughriders since coming out of retirement.
"Three interceptions, that's on me," Joseph said. "The game is on me. Three interceptions, that's on me.
"They started playing a lot more zone on us late in the second half. That's just totally on me. I've got to see the field better and I can't turn the ball over."
Rob Bagg and Chris Getzlaf were Joseph's scoring targets. Peters added the defensive touchdown off an interception and had a team-high 10 tackles. Kicker Chris Milo contributed field goals from 32 and 33 yards.
"The biggest thing I told them was I was proud of the way that group fought," Saskatchewan head coach Corey Chamblin said. "I saw their fire for 60 plus minutes and the guys believed. I'm very proud of that group. I told them we have to stay together.
"There'll be a lot of people that question why I'm proud of this group even though we didn't win. It was a small victory there. As we keep going, eventually it's going to turn around for us."
The Roughriders fell to 1-6 since regular starter Darian Durant tore a tendon in elbow Sept. 7 in a 30-24 win over Winnipeg. The Roughriders auditioned young pivots Tino Sunseri and Seth Doege before summoning Joseph, who quarterbacked them to a Grey Cup win in 2007.
It was the first meeting at McMahon between the two teams since Saskatchewan upset Calgary 35-13 in last year's division final en route to the Grey Cup title. The Stampeders were the top team in the regular season with a 14-4 record.
Calgary lost in the 2012 Grey Cup final to the host Toronto Argonauts.
"This is a very important time for us," Mitchell said. "The last two years, we have not finished. Grey Cup two years ago and Western final last year, the way it all ended, it leaves that disappointment, sour taste.
"We're not letting that go. We're harbouring that and making sure we use that to get out here get out here and keep that fire going these last games."
The CFL's top two running backs didn't play Friday. Leading rusher Jon Cornish of the Stampeders was healing aches and pains, while No. 2 Anthony Allen of the Riders was scratched because of back pain.
So Walter started at halfback in relief of Cornish. The 25-year-old Calgarian scored on a 23-yard run in the first quarter for his first touchdown since 2012. He added a two-yard run to score in the fourth and finished with 69 yards on 12 carries.
"I was pretty amped up after that first touchdown," Walter said. "On that play, I really didn't do too much. That's something in this game I learned about how to run the ball with our team.
"I don't have to do as much as I think I have to and once I started getting comfortable with that, the big plays are going to come. Cornish always told me to be patient. I never really understood it until I got to see for myself how that works. Let the (offensive line) do the work. They're the heart and soul of our team. Just put the rock forward and hold onto it."
With Cornish out and Eric Rogers making his CFL debut at wide receiver in place of injured Joe West, Mitchell used veteran slotback Nik Lewis heavily. Lewis finished with 98 yards on nine catches.
The Roughriders enter a bye week and conclude the regular season at home against the Edmonton Eskimos. The Stampeders face Winnipeg next Saturday in the final home game and finish on the road against the B.C. Lions.