When the fourth-round draft pick from Louisiana Tech paid his own way to come out to 49ers headquarters after the draft, Harbaugh declared: “He’s already my favorite guy.”

Now, Patton must be in Harbaugh’s Favorite Guy Hall of Fame.

Patton – who did very little over the first 15 games of the season because of injuries and being buried on the depth chart – came up with an unbelievable catch of a pass by Colin Kaepernick to set up a winning 40-yard field goal by Phil Dawson with no time left to lift San Francisco to a 23-20 victory over the Cardinals in Arizona.

The win gave the 49ers their sixth straight win, a 12-4 regular-season record, the No. 5 seed in the NFC playoffs and a playoff date with the Packers in Green Bay next weekend.

It will be a rematch of the first game of the season, when the Niners defeated the Packers in San Francisco, 34-28. It will also be a rematch of last year’s playoff meeting, won by the 49ers 45-31.

Green Bay won the NFC North title and the No. 4 seed with a 33-28 victory over the Bears Sunday. The Packers are 8-7-1.

On Sunday, the 49ers came out hot, taking a 17-0 lead in the first quarter on Dawson’s 27-yard field goal and TD passes to Anquan Boldin and Vernon Davis. But then the Cardinals came steadily marching back.

Carson Palmer’s 34-yard pass to Andre Roberts with 3:20 remaining tied the game up at 17-all. Dawson put the Niners back in front with a 56-yard field goal, which then was answered by Arizona with just 29 seconds left when Jay Feely made a 43-yard field goal.

But the 49ers then advanced from their own 36-yard line for the game-winning kick.

First, Kaepernick connected with Boldin for 18 yards to the Cardinals’ 46. After a delay of game penalty pushed San Francisco 5 yards back, Kaepernick hit Patton for 29 yards to the Arizona 22 with two seconds remaining.

Dawson then came on to kick the game winner and earn the 49ers the No. 5 seed and a date with the Packers.

Patton had two catches in the game for 34 yards, and also picked up 26 yards on the ground on an end-around play early in the game. Going into Sunday’s 16th game, his grand total was one catch for zero yards.

When Mario Manningham was injured recently, it opened a door for Patton to play as the team’s No. 3 wide receiver. The fact Patton was able to contribute when his team needed him affirmed Harbaugh’s evaluation of him back in May.

“The fact that he would buy his own ticket, fly out here, just speaks volumes about him,” Harbaugh said at the time. “To be honest with you, he reminds me of me. That’s something I would have done. I love it.”

Kaepernick completed 21-of-34 throws for 310 yards and two TDs. Boldin had nine catches for 149 yards, a TD and the first catch of the final drive.