A 31-yard field goal by Lawrence Tynes sealed a hard-fought victory for the Giants, who last won the Super Bowl four years ago with an improbable run to the title as a wild card.
Tynes split the uprights after the Giants had gained a decisive turnover in San Francisco territory after a fumbled punt return by 49ers receiver Kyle Williams.
The Giants, who made the playoffs after winning the regular season finale three weeks ago, will face the American Football Conference champion New England Patriots in the National Football League's title game on February 5 in Indianapolis.