Most of the Giants' players had seen such things only on television. They were in college or even high school when Eli Manning was making routine fourth-quarter comebacks, establishing his legacy as one of the league's top clutch performers.

But then it went dry. The last time Manning had led a comeback win in the final two minutes was Oct. 21, 2012, when he threw a winning 75-yard touchdown pass to Victor Cruz.

Manning didn't have Cruz on Sunday night. Nor did he have Rueben Randle. Nor, for most of the deciding plays in the frantic fourth quarter, did he have Odell Beckham Jr.

DatabaseEli Manning career touchdowns databaseStatsStats

That did nothing to stop Manning from engineering his 27th regular-season comeback in the fourth quarter with an 82-yard drive capped by an 11-yard touchdown pass to tight end Larry Donnell in the back of the end zone with 21 seconds left.

That touchdown gave the Giants a 30-27 victory over the 49ers at MetLife Stadium on Sunday night, ending a crazy game that had three lead changes in the final 4:29.

"That was something to watch there," second-year defensive end Kerry Wynn said. "I kept telling him, 'Good stuff! Congratulations! Good stuff!' I probably said that like 50 times. He was probably like, 'Get away from me!' "

advertisement | advertise on newsday

Asked where this rated among Manning's many comebacks, Tom Coughlin said: "About as high as you can rank it."

Manning completed a franchise-record 41 passes on a career-high 54 attempts for 441 yards.

"This win was huge for us, we needed it," guard Justin Pugh said. "A gritty, scrappy win. I'm proud of these guys."

Giants videos

Pugh said he didn't even realize that the receivers at the start of that final drive were Dwayne Harris, rookie Geremy Davis and recent practice-squadder Myles White. He didn't see numbers, he saw eyes.

"Confident people," he said. "I looked at someone and he looked me right back in the eye. When you see that, you know that guy is going to make a play."

A 17-yard touchdown pass to Beckham late in the third quarter gave the Giants a 20-13 lead, but it also cost them their best playmaker. Beckham went to the sideline with a hamstring injury after an aggressive touchdown dance and remained there for most of the fourth quarter.

The 49ers (1-4) tied the score at 20. Then, after Josh Brown's third field goal of the game, a 24-yarder, gave the Giants a 23-20 edge with 4:29 remaining, the 49ers drove for what looked like an all-too-familiar go-ahead touchdown drive.

Landon Collins missed an interception in the end zone that would have sealed the win for the Giants before Carlos Hyde ran it in from the 2 with 1:45 remaining.

advertisement | advertise on newsday

It looked as if the 49ers had sealed the game when Tramaine Brock was credited with an interception of Manning with 41 seconds left, but replays showed the ball hit the turf and the Giants retained possession.

More significantly, they regained Beckham. After badgering the medical and coaching staff to get back in the game, Beckham returned and picked up a key pass-interference penalty with 26 seconds left that set up Donnell's touchdown.

"It's amazing," Collins said of Manning. "He did it. You don't see too many quarterbacks who can do that, and he definitely did."

The win pushed the Giants (3-2) into sole possession of first place in the NFC East for the first time since late in 2012.

It gave them a three-game winning streak, but perhaps more significantly, it gave the young Giants roster a chance to learn that Manning still can orchestrate late-game wins when he needs to.

advertisement | advertise on newsday

"It was amazing to see us move the ball the way we did," Pugh said. "You know when you have Eli Manning back there, he's going to make plays for you."

If they didn't know it before, the Giants do now.

Notes & quotes: LB Jon Beason left the game with a concussion in the first quarter . . . Beckham said he expects to play next Monday against the Eagles. "I'm not worried," he said . . . Pugh missed the final two snaps with a rolled ankle but said he will be OK and expects to play against Philadelphia.