Wells, a fourth-year guard, made an 18-footer to give Portland a 93-92 lead with 48 seconds left. On the next trip, Stockton used a high pick-and-roll to beat Ruben Patterson for a layup that gave the Jazz the lead for good.
Wells missed a jumper and Karl Malone made 1-of-2 free throws, leaving Utah with a 95-93 lead. Wells spun into the lane for a short shot that bounced off the back rim.
"Unfortunately, my shots didn't go down, but I'll still be looking for those shots and I'll take them any other day," Wells said.
Bryon Russell pulled down the rebound and was fouled with 9.3 seconds to go. His two free throws opened a four-point lead, but Scottie Pippen answered with his fifth 3-pointer with 5.7 seconds left.
One of the greatest point guards in NBA history, Stockton beat Damon Stoudamire to the inbounds pass, dribbled past a pair of defenders along the right sideline and passed to a teammate before Portland could foul him. Stockton leaped and pumped his fist as time expired.
"I just got the ball and took off," Stockton said. "I don't know if anybody hit me or not. I think it was a situation that if you lose the ball and get hit, you know it. I just pushed it up as quick as possible, found Scott (Padgett) in the middle and was able to use up the clock."
"Every time we would make a shot, they would make a shot," Trail Blazers coach Maurice Cheeks said. "Stockton .. made play after play late in the game to kind of help them."
Malone had 24 points and 13 rebounds and Stockton added 17 and nine assists for the Jazz (25-22), who went 3-1 against the Blazers (24-21) this season. The teams are vying for a playoff berth in the Western Conference.
"That was really an important win for us," Jazz coach Jerry Sloan said. "You never know what's going to happen down at the end of the season. If you come out with a tie with that team, you end up in a tiebreaker."
The Jazz completed a 3-1 homestand and now embark on a nine-game road trip due to the Winter Olympics. They do not play again at the Delta Center until February 28.
"I think everyone wants to look at (it as) nine games straight on the road," Malone said. "You just take it one game at a time. We have the Olympics here and that's the way it is. You don't feel sorry for yourself; you just come out there and get ready to play."
Wells had 24 points and eight rebounds and Pippen scored 17 points for the Blazers, who played the final 17-plus minutes without forward Rasheed Wallace. The NBA leader in technical fouls picked up two more for arguing and was ejected with 5:29 left in the third quarter.
Stockton made both technical foul shots, completing a 19-2 run to open the second half that gave the Jazz a 65-58 lead. Malone scored seven points during the surge.
Utah maintained control into the fourth quarter and still held an 88-83 lead when Padgett hit a 3-pointer with 3:53 to go. Pippen drilled a pair of 3-pointers around a basket by Malone to cut the deficit to 90-89 with 2:07 left.
After Malone made two free throws, Ruben Patterson scored and was fouled with 1:29 to play. But he missed the potential tying free throw.
Damon Stoudamire scored 14 points and Wallace contributed 13 for Portland, which shot 51 percent (36-of-71) but committed 21 turnovers.