Atlanta owned a 24-14 lead at the half, but the 49ers scored a touchdown early in the third quarter and then added another touchdown following a short Atlanta punt in the fourth quarter to take their first lead of day.
Atlanta drove deep into San Francisco territory late in the fourth quarter but turned the ball over on downs.
The 49ers now advance to the Super Bowl to face either the Ravens or the Patriots.
The first half mostly belonged to the Falcons.
Matt Ryan found Tony Gonzalez for a touchdown pass with 25 seconds left in the second quarter to give the Falcons a big boost of momentum right before halftime.
Atlanta dominated the game early, jumping out to an early 17-0 lead. But San Francisco scored two touchdowns in the span of less than seven minutes in the second quarter to slice the Falcons' lead to 17-14.
Early on, Ryan hooked up with Julio Jones on a pair of scoring passes, the second one coming on the first play of the second quarter and giving the Falcons a 17-0 lead.
Ryan also connected with Jones on a 46-yard touchdown pass on the Falcons' first possession, and Matt Bryant kicked a 35-yard field goal with 3:24 remaining in the first quarter to give Atlanta a 10-0 lead.
Check back for updates.