Crabtree made a go-ahead 32-yard TD reception on the last play of the third quarter and Smith hit Davis on a 17-yard score with 7:14 remaining. Frank Gore ran for 149 yards, including a 64-yard scramble that set up Davis' third touchdown of the season.
Smith overcame a slow start to go 16 of 33 for 196 yards in his first turnover-free game of 2010, though San Francisco still committed 11 penalties for 143 yards. The Niners, whose 1-5 start is the franchise's worst since Bill Walsh's first team lost its initial seven games in 1979, denied Oakland its first back-to-back wins since 2008.
Sebastian Janikowski kicked field goals of 27, 24 and 40 yards for the Raiders (2-4).