Garoppolo also completed 28 of 37 passes for 317 yards in the victory Thursday at State Farm Stadium in Glendale, Ariz.
"He played great today," 49ers coach Kyle Shanahan said of Garoppolo. "He made a lot of plays in rhythm and made a lot of off-schedule plays. They got a great pass rush and had some real tight coverages and mixed up a lot of stuff. But I thought Jimmy had a hell of a game.
"It was probably his best game yet."
The Cardinals (3-5-1) took a 7-0 lead on the 49ers (8-0) with Kenyan Drake scoring a touchdown on the game's opening drive. Arizona and San Francisco exchanged first quarter punts before Garoppolo connected with tight end George Kittle for a game-tying touchdown toss at the end of the first frame.
Garoppolo threw a 7-yard touchdown to Kendrick Bounce for a 14-7 lead in the second quarter. He threw his third touchdown of the first half four seconds before the break, finding Emmanuel Sanders for a 1-yard score.
The Cardinals made the score 21-14 with a touchdown on their first drive of the second half. Kyler Murray found KeeSean Johnson for a 9-yard scoring toss to end that drive. The 49ers pushed the lead back to 14 points when Garoppolo threw his fourth touchdown pass of the game on the next drive. The 49ers quarterback hit Austin Pettis with a 21-yard throw to cap off the 7-play, 75-yard scoring drive.
Arizona's Zane Gonzalez made a 36-yard field goal and Murray connected with Andy Isabella for an 88-yard touchdown in the fourth quarter, but the Cardinals could not complete their comeback effort.
Drake had 162 yards from scrimmage and a touchdown in the loss. Murray completed 17 of 24 passes for 241 yards and two touchdowns. Sanders had a game-high 112 yards and a score on seven catches in the win. Kittle had 79 yards and a score on six receptions.
"It was really fun," Garoppolo said. "I had a great time out there. It was a great atmosphere. The crowd was rocking. The faithful [fans] showed up as usual. But we have a long way to go as a football team."
The Cardinals face the Tampa Bay Buccaneers at 1 p.m. EDT Sunday, Nov. 10 at Raymond James Stadium in Tampa, Fla. The 49ers host the Seattle Seahawks at 8:15 p.m. EDT Monday, Nov. 11 at Levi's Stadium in Santa Clara, Calif.