The 49ers turned to an old remedy to help cure what ailed their gasping-and-wheezing offense: Frank Gore.

After he curiously received only three second-half carries four days earlier Gore 30 rushed for 153 yards on 20 carries and had a 34-yard fourth-down touchdown dash to lead the 49ers to 28-11 win over the Rams on Thursday night.

The victory snapped the first two-game losing streak of the Jim Harbaugh era as the 49ers rediscovered their power-running game which had served them quite well the previous two seasons.

Gore’s 153 yards matched the fifth-highest total of his nine-year career and were his most since Dec. 14 2009 when he had 167 against Arizona.

Also notable: Gore’s 20 carries matched his total in the 49ers’ previous two games.

In San Francisco’s 1-2 start its running game had suffered from underuse. In last week’s 27-7 loss to the Colts Gore had 60 yards on his first four carries but received just seven more carries in the final 50 minutes.

Gore’s oddly light workload was a hot topic leading up to kickoff but offensive coordinator Greg Roman won’t have to field any why-don’t-you-run-the-ball-more questions next week: The 49ers’ 219 rushing yards were just 86 fewer than they managed in their first three games.

Gore headlined the offense but it was quarterback Colin Kaepernick and wide receiver Anquan Boldin who shook the offense out of a two-game slumber which included 10 points and the worst passer ratings of Kaepernick’s career.

Trailing 3-0 in the second quarter Kaepernick and Boldin connected for 42 yards on 3rd-and-10 from San Francisco’s 47. Three plays later they hooked up for a 20-yard touchdown on 3rd-and-19 to snap a 73-minute scoreless drought.

The 49ers took a 14-3 lead at halftime after Gore ripped off a 34 yard-run with 37 seconds left in the half. Gore sprinted through a huge hole created when left guard Mike Iupati pulled and bulldozed Rams rookie linebacker Alec Ogletree.

San Francisco stretched its lead to 21-3 in the third quarter on Kaepernick’s 12-yard touchdown toss to tight end Vernon Davis who returned after missing his first game since 2007 last week with a hamstring injury.