The 49ers twice threatened to make it a one-score game in Green Bay. They turned it over on downs after reaching the Green Bay 39, and then, after reaching the Green Bay 45 on the next drive, Brandon Allen threw a pick.
The pass caroomed off receiver Deebo Samuel and into the hands of safety Xavier McKinney, who returned it 48 yards to the San Francisco 26.
Three plays later, Packers running back Josh Jacobs scored on a 1-yard run.
It gave the Packers a 24-7 lead with 4:28, but the 49ers since have added a field goal.
McKinney’s pick was the Packers’ first takeaway since Devonte Wyatt recovered a strip-sack by Edgerrin Cooper on Jaguars quarterback Trevor Lawrence on Oct. 27.
Jacobs’ touchdown was his second of the day. He now has 99 yards on 22 carries.