Gore capped a seven-play, 82-yard drive with a 5-yard touchdown run the third quarter, pulling the 49ers within three points at 24-21, and later added a go-ahead, 9-yard score.
San Francisco had trailed 17-0 in the second quarter.
Gore finished with 90 yards on 21 carries and Colin Kaepernick went 16-of-21 for 233 passing yards and a TD toss for San Francisco, which gained a berth in Super Bowl XLVII.
Vernon Davis hauled down five passes for 106 yards and a score as the 49ers logged the third-biggest road comeback in NFL post-season history.
San Francisco will meet Baltimore in the Feb. 3 Super Bowl, marking its first appearance in the championship tilt since 1994.
The Ravens defeated New England in Sunday's AFC Championship Game.
Atlanta's Matt Ryan completed 30-of-42 passes for 396 yards and three touchdowns.
Julio Jones made 11 grabs for 182 with two scores and Roddy White added seven catches for 100 yards for the Falcons.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Ray Liotta sues skin care company over use of likeness