Jack Campbell made 27 saves for Toronto.
Dryden Hunt scored for New York, and Igor Shesterkin stopped 28 shots.
The Leafs have won five straight and are 10-1-0 since a four-game slide.
"It's a mindset," Rielly said. "That's half the battle in most things, if not more than that. Once you get it in your mind that you're gonna play a certain way, and you're just not going to give up chances against, the rest follows.
"The work ethic has always been there, the real desire to win has always been there. But it's just a mental hurdle and a mindset that we're starting to establish - and that's a great sign."
Leafs coach Sheldon Keefe said his forwards and defensemen are much more connected than they were during the team's 2-4-1 start.
"A lot of guys early in the season, they're trying to jump-start your season offensively looking to get going," he said. "That tends to change your mindset a little bit.
"It took us a little bit to get to this place."
The Rangers came in with four straight victories, and had earned points in eight of their last nine, but were unable to generate much of an attack until the third period.
"We gave ourselves a chance to at least get a point," Mika Zibanejad said. "That's how it goes sometimes."
Shesterkin, who made 40 saves in New York's 2-1 overtime victory at Toronto on Oct. 18, had a nice blocker stop on Jason Spezza early in the first period off a turnover, but Toronto pushed ahead moments later.
Rielly took a pass from Wayne Simmonds at the point and snapped a one-timer on Shesterkin with Michael Bunting providing a screen in front for the defenseman's second goal of the season at 3:41.
Auston Matthews tested Shesterkin on a couple of chances midway through the second before Campbell denied Julien Gauthier at the other end.
Toronto got its first power-play opportunity a few minutes later, and after Campbell snagged Kevin Rooney's chance on a 2-on-1 break, the Leafs connected on the man advantage for the 10th time their last 10 games.
Rielly took a pass at the left point and was given acres of space by New York's penalty killers before toe-dragging around Jacob Trouba and scoring his third - and third in four outings - at 10:59 of the second.
"We're comfortable in these (close) games," said Matthews, who set up Rielly's second goal. "We've had a lot of them lately. When the third period comes around, we're trying to stay within our structure. Tonight, we let them get rolling around a little bit more than we'd like."
Campbell didn't have a lot to do, but was sharp on an Artemi Panarin effort late in the period.
Hunt broke the shutout bid at 3:30 when he banged home a loose puck after Kaapo Kakko's initial shot went off linemate Ryan Strome in front.
The Rangers continued to push, but Campbell was there at every turn, including a pad stop of Chris Kreider and a glove save on Trouba.
"He's been phenomenal," Rielly said of Campbell, who leads the NHL in save percentage and goals-against average. "He just goes about his business. He's just stopping everything ... you just want to leave him alone.
"He's like a starting pitcher - you let him do his thing."
Rielly scored two goals in a game for the fourth time in his NHL career. ... Former Toronto Blue Jays third baseman Josh Donaldson was in attendance.
The Rangers host Buffalo on Sunday.
The Leafs host Pittsburgh on Saturday to wrap up a stretch of nine of 11 games at home.
Maple Leafs beat Rangers behind Rielly's two goals
Morgan Rielly has his first multi-goal game in two seasons as the Leafs beat the Rangers 2-1.