Kendall Hunter's touchdown run late in the 8 decision over the Cincinnati Bengals.
Hunter carried the ball nine times for 26 yards spelling Frank Gore, who totaled 42 yards on 17 carries.
Andy Dalton went 17-for-32 through the air for 157 yards and two interceptions in the loss for Cincinnati (1-2).
Reggie Smith picked off Dalton with 1:45 left to seal the outcome.
Cedric Benson accounted for 64 yards on 17 carries for Cincinnati.
With the game tied at three, a Bengals' punt gave the 49ers the ball on their own 10-yard line. Gore broke up the middle for a five-yard gain on first down, but was stripped of the ball and Cincinnati recovered at the 16.
Benson's 10-yard run on first down gave the Bengals the ball inside the 10, but the 49ers' defense held them to a 23-yard field goal by Mike Nugent with 9:04 remaining.
On the ensuing drive, Smith orchestrated a 10-play, 72-yard drive to put the 49ers on top for the first time in the game. Smith hit Davis three times for 36 yards on the march before Hunter broke free for a seven-yard run, giving San Francisco a 10-6 lead with 3:59 left in the game.
Dalton completed passes of 22 and 17 yards to Jermaine Gresham before hitting Andre Caldwell for an eight-yard gain, placing the ball at the 49ers' 36. But Reggie Smith made a diving interception on Dalton's next pass to seal the victory for San Francisco.
Punter Andy Lee ran out of the end zone in the final seconds of the game trying to run out the clock to account for the final score.
Cincinnati took the opening possession of the game 76 yards on 12 plays. Dalton went 5-for-6 for 61 yards through the air, but the drive stalled at the San Francisco four-yard line and the Bengals had to settle for a 22-yard field goal by Nugent.
"We're not converting in the red zone. We had opportunities in the red zone today and we're not coming away with touchdowns," Bengals head coach Marvin Lewis said. "Right now that's obviously our biggest deficiently."
Defense was the story for the rest of the first half, as the furthest either team reached into the other's territory was when the Bengals were able to get to the 49ers 46 early in the second quarter. They were unable to convert a 3rd-and-3, however, and were forced to punt.
San Francisco was not able to pass the 50-yard line until its second possession of the third quarter it took over on its own 47-yard line after Cincinnati had to punt deep in its own territory. Alex Smith hit Michael Crabtree for an eight-yard gain before lofting a pass down the right sideline to Davis for a 39-yard strike.
Two plays later, Crabtree made a leaping catch in the back of the end zone but had stepped out of bounds first, resulting in an illegal touching penalty. A late hit penalty on the Bengals gave the 49ers a fresh set of downs, but San Francisco had to settle for an Akers 23-yard field goal, knotting the game at three with 3:29 left in the third.
Cincinnati went 0-for-5 on third downs in the first half and finished the game converting just 1-of-10...San Francisco went 5-for-15 on third downs...Akers' field goal in the third quarter was his 300th career field goal made...Bengals rookie wide receiver A.J. Green failed to catch a touchdown pass for the first time this season...San Francisco leads the all-time series between the teams 9-3 and has won five out of the last seven contests.