They came up 10 yards short.
On fourth down, Matt Ryan attempted a pass over the middle to Roddy White that would have been enough to keep the drive going. But linebacker NaVorro Bowman stuck a hand in to knock it away with 1:13 remaining.
The 49ers ran off all but the final 6 seconds, not nearly enough time for Ryan to pull off his greatest comeback yet.
In the divisional playoffs, the Falcons blew a 20-point lead in the fourth quarter, the Seahawks scoring the go-ahead touchdown with 31 seconds remaining. But Ryan completed two long passes, setting up Matt Bryant’s 49-yard field goal for 30-28 victory.
The Falcons came up short of their second Super Bowl, leaving the 1995 Braves as the city’s only major sports champions. This one figures to hurt for a while.
‘‘We didn’t make the plays when we had the opportunity,’’ Falcons coach Mike Smith said. ‘‘There were five or six plays, like in most hard-fought games, that make a difference. There were ebbs and flows and changes in momentum, and they made more plays than we did.’’
Kaepernick, who ran for 181 yards against the Packers the week before to set an NFL playoff record for a quarterback, didn’t have much chance to use his legs against the Falcons. He broke off a 23-yard gain, but was thrown for a 2-yard loss the only other time he carried the ball.
But Kaepernick showed he’s more than a runner. His favorite receiver was Davis, who hauled in five passes for 106 yards.
Gore carried 21 times for 90 yards, while James added 34 yards on five carries.
Ryan finished 30 of 42 for 396 yards, by far the best performance of his playoff career. But his postseason record dropped to 1-4, done in by two big miscues — an interception and a fumble — in the second half.
Julio Jones was Ryan’s leading target most of the day, finishing with 11 catches for 182 yards and a pair of touchdowns. He hauled in a 46-yarder less than 4 minutes into the game, then made a dazzling grab in the left corner of the end zone for a 20-yard score. He got his left foot down, then planted his right foot about an inch inside the line — while cornerback Tarell Brown was all over him.
Ryan threw a 10-yard touchdown pass to Gonzalez with 25 seconds remaining in the first half after the 49ers had cut the deficit to 17-14. It seemed the home team had reclaimed the momentum heading to the locker room, but, amazingly, that would be its final score of the day. The 49ers quickly seized control on the opening possession of the second half, driving 82 yards in just seven plays for Gore’s first TD.
After a nearly perfect first half, in which Ryan was 18 of 24 for 271 yards and those three TDs, the quarterback known as Matty Ice made a couple of crucial blunders.
First, he tossed a pass that was picked off by Chris Culliver, halting a drive in 49ers territory. Ryan ripped off his chinstrap in disgust.
Then, with the Falcons in scoring range for at least a field goal, Ryan failed to grab a shotgun snap, appearing to take his eyes off the ball before he caught it. The ball squirted away and Aldon Smith recovered for the 49ers at their own 37.
‘‘Against a good team, you can’t have those kind of mistakes,’’ Ryan said.
San Francisco also squandered some chances. Struggling kicker David Akers clanked a 38-yard field goal try off the upright, and Michael Crabtree fumbled just short of the goal line, the ball stripped away by Dunta Robinson and recovered by Stephen Nicholas. But, after that big defensive stop with 13 1-2 minutes remaining, the Falcons went three-and-out.
The 49ers drove for the winning touchdown.
Atlanta took the ensuing kickoff and used up nearly all the clock while going 70 yards. The Falcons might have reclaimed the lead if Harry Douglas had been able to stay on his feet while hauling in a 22-yard pass.
The defender slipped, and so did Douglas, but he held on to the ball. Harbaugh thought it touched the turf and challenged the call, then launched into his tirade when the officials let it stand. It all worked out, though.
As for the 36-year-old Gonzalez, who said all year he was all but certain this would be his final season, it sure sounded like the end.
‘‘I've had such a great life,’’ he said. ‘‘I wish it would've culminated with the Super Bowl, but it didn't.’’
Online: http://pro32.ap.org/poll and http://twitter.com/AP_NFL
Follow Paul Newberry on Twitter at www.twitter.com/pnewberry1963