The top-seeded Falcons (14-4) tried to pull out another season-saving drive at the end, but Matt Ryan's fourth-down pass for Roddy White with 1:13 remaining was knocked down by San Francisco linebacker NaVorro Bowman.
The 49ers (13-4-1) will meet the winner of the AFC title game between New England and Baltimore. San Francisco will be trying to join Pittsburgh as the only teams with six Super Bowl championships.
The victory was sweet redemption for the 49ers, who lost an overtime thriller to the New York Giants a year ago in the NFC title game.
The 49ers pulled off the biggest comeback victory in an NFC championship game, according to STATS. The previous NFC record was 13 points—Atlanta's victory over Minnesota in the 1999 title game, which sent the Falcons to what remains the only Super Bowl in franchise history.
In the AFC, the record is 18 points, when Indianapolis rallied New England in 2007.
Gore's 9-yard run midway through the fourth quarter completed the comeback from a 17-0 first-half deficit. The run came at the end of a short 38-yard drive set up by Ted Ginn Jr.'s 20-yard punt return.
Gore had a 5-yard touchdown run to cap an 82-yard drive to open the second half.
The high-scoring pace of the first half continued as the 49ers began their run of points. Colin Kaepernick had passes of 21 and 17 yards to Randy Moss in the drive. The 17-yarder moved the 49ers to the Falcons 5, setting up Gore's scoring run.
Matt Ryan threw three touchdown passes in the first half, including a 10-yard toss to Tony Gonzalez with 25 seconds remaining in the half. The score answered San Francisco's two straight touchdowns as Atlanta led 24-14 at halftime.
Ryan also threw touchdown passes of 20 and 46 yards to Julio Jones.
Ryan was hurt by two third-quarter turnovers. His pass for Roddy White was intercepted by cornerback Chris Culliver early in the third quarter. The 49ers couldn't take advantage of the game's first turnover when David Akers' try for a 38-yard field goal hit the left upright.
Later in the third quarter, Ryan fumbled a shotgun snap. Again the 49ers were denied when receiver Michael Crabtree fumbled at the goal line when stripped by Dunta Robinson. William Moore helped on the hit and Stephen Nicholas was credited with the recovery.
The Falcons led 17-0 following Ryan's 20-yard touchdown pass to Jones on the first play of the second quarter.
Kaepernick threw a 4-yard scoring pass to tight end Vernon Davis and LaMichael James had a 15-yard touchdown run as the 49ers charged back.
Trailing 17-0, the 49ers answered with a long drive that consumed almost 7 minutes. The drive began with four straight runs by Gore.
On third-and-7 from the Falcons 42, Kaepernick completed a 27-yard pass to Davis to the 15. Following an incomplete pass on first down, James ran right behind a block by Davis for the touchdown.
The 49ers then went on an 82-yard touchdown drive. Big plays included Kaepernick's 19-yard pass to Davis and a 23-yard run by the dual-threat quarterback.
Falcons linebacker Nicholas helped the 49ers with a 15-yard penalty for unnecessary roughness.
On first down from the Falcons 4, Kaepernick rolled right before throwing to Davis for the touchdown.
Ryan opened the game with three straight scoring drives, including two touchdown passes to Jones. Ryan capped the Falcons' opening drive with a 46-yard touchdown pass to Jones.
Matt Bryant's 35-yard field goal capped the Falcons' second drive.
Ryan moved the Falcons 80 yards on seven plays on Atlanta's opening drive. Ryan completed passes of 13 yards to Jones and 16 yards to White on the drive.
On second-and-9 from the 49ers 46, Ryan faked a handoff to Jacquizz Rodgers. San Francisco safety Dashon Goldson bit on the fake, allowing Jones to run past Goldson. Jones was open for the deep pass as safety Donte Whitner trailed on the play.
Ryan completed a 27-yard pass to Jones to set up Bryant's field goal to end the Falcons' second drive. Jones beat Goldson on the catch.
On the first play of the second quarter, Ryan threw to Jones in the left corner of the end zone. Jones was closely covered by 49ers cornerback Tarell Brown. Jones made the catch over Brown and then looked down as he made sure he touched the end zone with both feet.
Jones' second foot was close to the back of the end zone, but the officials' review confirmed the touchdown.
Ryan completed 18 of 24 passes for 271 yards and three touchdowns in the half. Jones had seven catches for 135 yards and two touchdowns.
The Falcons had a strong start for the second straight week of the postseason. They led Seattle 20-0 at halftime in last week's divisional playoff game and lost the lead before winning 30-28.