ATLANTA — The week began with an infamous online video costing an assistant coach his job and ended with an offense that couldn’t shoot straight suddenly discovering a way to score on four straight possessions.

It ended with the head coach getting an impromptu victory ride off the field courtesy of a fellow “hothead” — the coach’s word. Next, the coach, sporting a backward ballcap and no shoes, went around the locker room, bumping fists with any knuckles that got in his way.

“We R Not Normal” said the new, black T-shirts many players were slipping on.

Yeah, we’re kind of figuring that out, Dolphins.

The Dolphins upset Atlanta 20-17 on Sunday, overcoming a 17-0 halftime deficit that conjured deja blues for Falcons fans still smarting over blowing that 28-3 lead in the Super Bowl.

This time, it wasn’t the New England Patriots that did in the Falcons, but the O-Jays — an offense featuring Jay Ajayi, who ran for 130 yards, and the formerly maligned Jay Cutler, who threw touchdown passes of 11 yards to Kenny Stills and 7 to Jarvis Landry. Cody Parkey kicked two field goals as the lowest-ranked offense in the NFL scored on every second-half possession of consequence.

Package that with the defense pitching a second-half shutout against the NFL’s fourth-rated offense and what you get is something that isn’t normal. Something that — at least for the time being — could prove as meaningful to this season as the victory over Pittsburgh was toward righting the ship last year.

“It’s one of those playoff-type of games,” said Landry, who gave Adam Gase a victory ride off the field. “It’s something that we continue to prove to ourselves that we can win these games, that we can play with these teams that were in the tournament last year. And for us, listen: It’s a great momentum-builder for us to continue on the rest of our schedule.”

It pushed the Dolphins over .500 at 3-2 and had a potentially pivotal feel, just as defeating the Steelers last season helped erase a 1-4 start and lead to a playoff berth. At the very least, it showed what the team is capable of when the situation turns dire.

“These guys are different cats,” Gase said. “They have something in them where it doesn’t matter what the score is. They will battle. Today was the first time the offense kind of gave our defense a little hope.”

Dolphins kicker Cody Parkey made two field goals in the second half for the deciding points. (AP Photo/John Bazemore)

By halftime, the offense had been shut out in all but three of the previous 14 quarters. Samuel L. Jackson, firing up fans on the ring of video boards above the field, may as well have been asking, “What’s in your wallet? A victory?” But Miami’s defense shut out the Falcons in the second half, holding Atlanta to five first downs and 106 total yards.

“That’s been our M.O.,” said Ajayi, who averaged 5.0 yards on 26 carries. “Whatever it is, however it is, we’ve got to find a way to get it done. We have a lot of great personalties on this team that have helped build that culture of being able to challenge adversity and fight it head on. This has been a great game to showcase that and we did.”

Easily lost amid a flurry of huge second-half plays is the confidence Gase showed in his offense, twice getting rewarded for fourth-down gambles. A fourth-and-1 produced a 3-yard pass from Cutler to Damien Williams to set up Stills’ touchdown. Then, a fourth-and-2 saw Cutler hit Landry over the middle, and Landry held on despite taking an airborne flight courtesy of safety Ricardo Allen. That set up Parkey for a 49-yard field goal and a 17-all tie with 8 1/2 minutes to go.

After the Falcons went three-and-out, with William Hayes dropping running back Tevin Coleman for an 8-yard loss, Ajayi ripped off back-to-back 18-yard runs to set up Parkey’s 38-yard field goal for the winning points.

At times, the Falcons tripped over themselves. An interception by linebacker Deion Jones was nullified by a roughing-the-passer penalty against defensive tackle Grady Jarrett. Two plays later came Landry’s TD in which he went in motion but the Falcons didn’t. They left him alone in the flat.

“Nobody can guard me,” said Landry, who celebrated by launching the ball 26 rows up into the end zone stands. “I was wide open. I was always open. … It’s a great play design by coach. He did a great job of scheming that up. They’d been playing us man to man in that formation. We just couldn’t get in the red zone to really have an opportunity to call it and finally we got down there to have the opportunity and we got what we wanted and made it work.”

The Falcons weren’t done. On the strength of 18- and 22-yard passes by Matt Ryan, Atlanta moved to the Miami 26 with 47 seconds left and had at least overtime seemingly sealed. That’s when Ryan tried to force a ball to tight end Austin Hooper despite coverage by rookie cornerback Cordrea Tankersley, who got a hand on the ball and deflected it. Safety Reshad Jones cradled the ricochet, and that was that.

Likewise, Ajayi indicated that the offensive players were confident they could run on the Falcons.

“Our mindset was to be downhill physical with these guys,” Ajayi said. Seeing that the strategy was working, Ajayi asked Gase to continue calling plays that victimized Jones.

“Let me read off him,” Ajayi said he told Gase. “I knew he would overpursue a little bit.”

Next Sunday, the Dolphins will be host to the New York Jets, who began Miami’s tailspin with a 20-6 victory in the Meadowlands.

“We’ve got a team that whupped us pretty good the first time,” Ajayi said. “So we’ve got something for them next week.”

The Dolphins began the week accepting the resignation of offensive line coach Chris Foerster after a bizarre video surfaced online of him snorting a white powder. It ended with a victory few saw coming.

“Hopefully it’s another piece of evidence to show what we’re capable of,” said defensive end Cameron Wake, who had a fourth-quarter sack on Ryan. “Whether this is a year-changing win or not, we’ll be able to look back on when the season is over.”