Click photo to enlarge
Matthew Stafford #9 of the Detroit Lions lies on the ground after being sacked by Justin Smith #94 of the San Francisco 49ers during the NFL game at Ford Field on October 16, 2011 in Detroit, Michigan. The 49ers defeated the Lions 25-19. (Photo by Leon Halip/Getty Images)

DETROIT -- A 5-1 start, as well as three comeback victories in as many road games, has vaulted the 49ers into legitimate playoff contention. Surely the NFL world is taking notice.

"They see that we're coming," running back Frank Gore said after a 25-19 win Sunday over the previously unbeaten Detroit Lions at Ford Field.

The game's lasting sight won't be Delanie Walker's go-ahead touchdown catch on Alex Smith's 6-yard, fourth-and-goal pass with 1:51 remaining. Nor will it be the 49ers' feisty defense that foiled one last Lions drive as the clock expired.

Instead, there was this bizarre, postgame scene: 49ers coach Jim Harbaugh jubilantly racing across the field to shake hands with Lions coach Jim Schwartz, who later gave chase to confront Harbaugh en route to the locker-room tunnel. The coaches had to be separated by players and security staff.

"I was just really revved up. Totally on me," Harbaugh said. "I shook his hand too hard. It was like a slap-grab-handshake."

Schwartz accused Harbaugh of not following "protocol" for postgame handshakes and of "surprising" him with an obscenity.

Six games into Harbaugh's tenure, the 49ers are off to a stunning 5-1 start, which was last seen by them in 1998. Now they head into their bye week on a four-game win streak, their first since 2001.

"It's amazing to see the transformation we've become since day one," linebacker Patrick Willis said. "We know that no matter what happens, we'll continue to fight."

The 49ers overcame a 19-15, fourth-quarter deficit, plus a season-high 15 penalties for 120 yards before an insanely loud crowd of 62,061.

This comeback may not have been as large as the 20-point deficit the 49ers overcame two weeks ago in Philadelphia, but it will garner more respect than their 13-8 come-from-behind win Sept. 25 at Cincinnati.

"I've never been a part of something like this since I've been a pro," said Smith, a seventh-year veteran who was 17 of 32 for 125 yards.

Added Harbaugh: "(This) says they've got a lot of character and steel in their spine. They really do. (I) feel like something special is really brewing here."

When Walker's touchdown was upheld after a replay review, Harbaugh threw his hands up in celebration, as did his players on the field and general manager Trent Baalke up in the press box.

The 49ers defense denied the Lions a first down on the ensuing possession, and David Akers followed with his third field goal of the game, this one from 37 yards.

Ted Ginn Jr., whose 40-yard punt return set up the go-ahead drive, said: "We came here and fought like 53 men. All we had were 53 men and coaches, and we stuck together as one."

The Lions made it a tough fight from the onset. Smith got sacked and lost a fumble on the 49ers' first snap, when Kyle Vanden Bosch raced around left tackle Joe Staley. Vanden Bosch pounced on the ball at the 49ers' 32-yard line, but the Lions couldn't fully capitalize.

The 49ers' league-best red-zone defense forced the Lions to settle for a 25-yard field goal by Jason Hanson and a 3-0 lead.

Then came the 49ers' second series, and along with it back-to-back false-start penalties. Those were reminiscent of the Chicago Bears' nine false starts in a loss at Ford Field last Monday night; the 49ers finished with five false-start penalties.

"The defense played unbelievable today," Smith said. "They deserve all the credit for the 'W.' They played lights out."

Although the defense failed to produce any turnovers for the first time this season, it delivered points when Aldon Smith sacked Matthew Stafford for a second-quarter safety. That brought the 49ers within 10-9, and they pulled ahead 12-10 on Akers' 55-yard field goal as the first half expired.

More points still would come from both teams, but none from Lions wide receiver Calvin Johnson, who set a league record with nine touchdown catches in the first five games. Johnson did finish with seven catches for 113 yards.

Gore helped the 49ers offense snap out of its early-game funk. He finished with 141 yards on only 15 carries, including a 1-yard touchdown run that opened the second quarter. Two plays earlier, he scampered 47 yards. He also had a 55-yard run in the third quarter to set up a 31-yard field goal.

In the end, the 49ers came away with what Willis called "by far" the best victory he has enjoyed. After hailing the overall team effort, he singled out the offense's clutch finish.

Said Willis: "Finding a way to come through like they did at the end, it was unbelievable."

Some might say the same of the 49ers' 5-1 start.

For more on the 49ers, see Cam Inman's Hot Read blog at blogs.mercurynews.com/49ers.