SAN FRANCISCO ­— On the road. In the NFC Championship. In overtime. The Patriots, already in, awaiting the winner. Harsh weather affecting every move. A draining, physical battle. A field goal to win it.

It was all so eerily familiar.

“Everything that happened is happening all over again, you understand? ‘’ Osi Umenyiora said.

It is not easy to understand what is going down with these Giants. What transpired four years ago was coming alive again last night as a brutal slugfest of a game, in the rain and wind, was nearing its climax as Lawrence Tynes lined up for a 31-yard field goal.

Tynes, after a timeout attempting to ice him, drilled the game-winner 7:54 into overtime, sending the Giants past the 49ers, 20-17, in an overtime throwback defensive battle at dripping-wet Candlestick Park. Just like he did four years ago in frigid Green Bay, in overtime, Tynes made the kick that allowed the upstart Giants to play on.

The Giants leaped into the air, landing on the muddy grass as Tynes raced to his wife, Amanda, both of them “crying like babies.’’

The kick, and all the energy expended to outlast a ferocious 49ers defense that knocked resilient Eli Manning around like a rag doll, produced a glorious grand prize, sending the Giants to Super Bowl XLVI, where waiting for them in Indianapolis will be the Patriots in a rematch of the classic upset four years ago in Glendale, Ariz., where the Giants ended the Pats’ perfect season with a stunning, last-second 17-14 triumph.

Four years later, with 15 players from that title team sprinkling the roster with big-game experience, the Giants again take aim at Tom Brady and Co.

“It is hard to believe,’’ co-owner John Mara said. “I think it will be a great game. I think there will be some points scored.’’

If so, it will be a stark contrast to what Coughlin called “just a classic football game’’ that featured “football at its most basic element.’’ At times, it appeared as if no team could muster enough yards to get any more points and it was clear something unexpected was going to make the difference.

Unable to get anything accomplished with Manning in a collapsing pocket, the Giants were saved by a monstrously big special-teams play. Steve Weatherford’s punt sailed to Kyle Williams, who was handling all the return duties because Ted Ginn Jr. (knee) was injured and not in uniform.

Williams caught the ball in stride but as he got motoring, rookie linebacker Jacquian Williams reached out with his right arm and poked the ball loose. Devin Thomas, the gunner, alertly pounced on it on the 49ers’ 24-yard line, fulfilling Coughlin’s hunch that “I felt someone that did not necessarily get the kudos, not someone everyone was familiar with . . . I felt someone like that would step up and make the big play.’’

From there, the Giants knew exactly what to do. They ran Ahmad Bradshaw three times, Manning centered the ball and Tynes lined up for a 26-yard field goal. The Giants were called for a delay-of-game penalty, pushing Tynes back five yards.

“I knew before I picked my head up that it was good,’’ Tynes said.

This was an inelegant, defensive battle filled with stops and sacks and filled with 22 punts, an endurance test that went the distance, and beyond.

The 49ers took a 7-0 lead on a 73-yard touchdown connection from Alex Smith to Vernon Davis, but Manning’s six-yard scoring pass to Bear Pascoe and Tynes’ 31-yard field goal put the Giants ahead 10-7 at halftime.

Another strike to Davis made it a 14-10 49ers lead in the third quarter, but the Giants got a break early in the fourth quarter when a Steve Weatherford punt glanced off the knee of Williams, allowing Thomas to recover on the 49ers’ 29. That set up Manning’s best throw, on third-and-15, to Mario Manningham for a 17-yard strike to put the Giants up 17-14 with 8:34 left in regulation. The Giants couldn’t hold the lead and David Akers’ 25-yard field goal with 5:39 remaining in the fourth quarter tied it at 17.

Manning, forced to throw 58 times, was sacked six times and afterward had welts on the right side of his face.

The Giants did not have any turnovers on a night when rain, at times heavy, at times misting, made ball security a challenge.

A late drive at the end of regulation died near midfield. The Giants got the ball twice in overtime and couldn’t do a darn thing with it. The Giants’ defense was just as swarming, limiting Smith’s very conservative passing attack.

One team had to blink, and the turnover by Williams was that blink.

Once again, 2007 is reappearing for the Giants.

“Hopefully we will have the same result,’’ Umenyiora said. “We still have one more game to go. But this is truly unbelievable.’’