2of4DENVER, CO - AUGUST 19: Quarterback Jimmy Garoppolo #10 and head coach Kyle Shanahan of the San Francisco 49ers shake hands before a preseason game against the Denver Broncos at Broncos Stadium at Mile High on August 19, 2019 in Denver, Colorado. (Photo by Justin Edmonds/Getty Images)Photo: Justin Edmonds / Getty Images

Sunday will mark the first time Falcons quarterback Matt Ryan and 49ers head coach Kyle Shanahan have been in the same stadium since Atlanta lost a 25-point lead in their overtime loss to the Patriots in Super Bowl LI nearly three years ago.

Before that nightmare, however, Ryan and Shanahan, then the Falcons’ offensive coordinator, had a dream season: Atlanta scored the ninth most points (540) in NFL history, and Ryan was named the NFL MVP after posting the fifth highest passer rating (117.1) in league history.

Shanahan, of course, is now working with Jimmy Garoppolo, who is aiming for the offense to reach the level of those 2016 Falcons.

“That’s the benchmark,” Garoppolo said. “That offense was rolling throughout the entire year, into the playoffs, Super Bowl — all that stuff. Obviously, it’s a good benchmark for us.”

With the Falcons visiting Levi’s Stadium on Sunday, Shanahan, Garoppolo and the offense appear to be approaching the standard Ryan helped set.

With three regular-season games remaining, the 49ers rank second in the NFL in points with 397, which matches their second most in a season since 2001. They are on pace to score 489 points, which would rank second in franchise history since 1950 behind the 1995 49ers (505).

The 49ers are averaging 34.4 points in their past seven games after averaging 26 in their first six.

And Garoppolo’s recent surge explains the uptick in performance: In his past seven starts, he’s posted a passer rating of at least 110 in six games, had the first trio of four-touchdown performances in his 23-start career and had his longest career completion (75 yards).

Garoppolo has thrown 18 touchdowns and five interceptions in his past seven games; he threw 18 touchdown passes and 14 interceptions in his first 14 starts with the 49ers.

“We’re starting to catch our groove a little bit and putting up a lot of points. … Everyone is starting to catch that stride, and it starts with No. 10,” right tackle Mike McGlinchey said. “The preparation that he puts in week in and week out. The command that he’s starting to feel. The confidence and swagger that he plays with — I don’t know if anybody has more of that than him. It’s just been special to be a part of.”

It’s been noted that Garoppolo’s seven-game hot streak coincided with the 49ers’ debut of wide receiver Emmanuel Sanders. However, it’s also coincided with the point at which Garoppolo was two games shy of making a full season of starts in Shanahan’s offense.

It took Ryan a full season to start clicking with Shanahan. Before his MVP year, Ryan had the third lowest passer rating (89) of his 12-year career in 2015.

Ryan, who was entering his eighth season when Shanahan arrived in Atlanta, had been accustomed to playing in a shotgun-heavy system. Shanahan had Ryan take more snaps under center while carrying out play fakes in which Ryan turned his back to the defense.

“Having your back to the defense is a lot harder than being in shotgun and being able to see everything,” Shanahan said. “But people not getting open is even harder. When you have a guy who’s going to be successful regardless of what you do, and has been successful before, there’s always easier ways for them to do it. ...

“When (Ryan) did go through hard times, he didn’t just sit there and try to go back to what he did. He understood why we were doing it, and he kept working at it.”

On Sunday, Ryan will try to lead the Falcons (4-9), 10 ½-point underdogs, to an upset by working over the NFL’s second-ranked, yet injury-ravaged, defense. The 49ers will be without four defensive starters, a group that includes cornerback Richard Sherman and safety Jaquiski Tartt. Nickel corner K’Waun Williams is also sidelined.

First, however, Ryan figures to have a warm pregame reunion with his former coach.

“Kyle had a huge impact on my career,” Ryan said. “He challenged me to get better and to improve in certain areas. He taught me a lot about offensive football and just seeing things from a different perspective. I feel like I had big jumps in our two seasons together.”

Meanwhile, Garoppolo, in the midst of his own jump, will attempt to continue his hot streak Sunday against the NFL’s 24th-ranked pass defense.

Atlanta (4-9) at 49ers (11-2)

Spotlight on: C Ben Garland: The 49ers shelled out big money for free agent Weston Richburg last year because the center position is so vital in Kyle Shanahan’s system. Now, after Richburg suffered a season-ending knee injury last week, they’ll turn to Garland, a six-year veteran who will make his eighth career start Sunday. Garland performed capably in 36 snaps in the raucous Superdome after Richburg was injured in New Orleans. Sunday, he’ll face a big test in DT Grady Jarrett, who ranks second on the Falcons in sacks (5 ½).

Eric Branch has worked at the San Francisco Chronicle since 2011 as the 49ers beat writer. Before that, he covered the 49ers for the Santa Rosa Press Democrat in 2010. Since he began his career in journalism in 1997 in Logansport, Ind., he’s covered events ranging from archery tournaments to the NCAA Men’s Basketball Tournament.