Green Bay had already pulled off the biggest shock so far in this season’s play-offs, winning 48-32 at second seed Dallas while the 49ers were resting on wildcard weekend.
Like last week, the Packers made a positive start, spending the most time in possession in the first half. But they failed to capitalise and the 49ers led through Purdy’s 32-yard touchdown pass to George Kittle.
After a tense first half, the lead changed hands three times during an action-packed third quarter, which featured three touchdowns, a huge kick-off return and an interception.
Green Bay quarterback Jordan Love threw a 19-yard touchdown pass to Bo Melton and the 49ers hit straight back with McCaffrey bursting through to run it in from 39 yards.
Keisean Nixon then returned the kick-off for 73 yards and, although he fumbled when tackled, Eric Wilson recovered it to keep possession for the Packers. Moments later Love sent Tucker Kraft into the end zone.
The momentum shifted back to San Francisco as Love was intercepted by Greenlaw, and the hosts cut the deficit to 21-17 with a field goal at the start of the fourth quarter.
The Packers will rue sending a field-goal attempt narrowly wide from 41 yards as Purdy led the 49ers into a game-winning position on the next possession.
The 24-year-old still has his detractors as he was the last player picked in the 2023 draft and is surrounded by a star names on the 49ers roster, but he held his nerve to lead a decisive 69-yard drive lasting 12 plays and more than five minutes.