CHICAGO -- Blaine Gabbert hit Torrey Smith for a 71-yard touchdown pass with 12:50 remaining in overtime to give the San Francisco 49ers a 26-20 victory over the Chicago Bears on Sunday at Soldier Field.

"It was set up by all the throws we had underneath early on in the game," Gabbert said, "all the runs we ran out of that formation. It worked perfectly. Torrey did a great job tracking the ball in the air and using his speed to outrun everybody.

"They took the bait and he did a great, great job selling the deep cross and hitting the back pylon. I just tried to cut it early with as much air as possible and let him find it when the ball was in the air. It worked out beautifully."

Said Smith, who now has three TD catches of at least 70 yards this season, the first Niners receiver to do that in a season since John Taylor in 1989: "They were sitting on is so, what are we waiting for? Let's go get it."

The play was made possible by Bears kicker Robbie Gould's miss on a chip-shot 36-yard field goal at the end of regulation. He also missed from 40 yards earlier in the game.

For Smith, it was just his second catch of the day. Gabbert, though, had a 44-yard touchdown run and his heroics saved the Niners' poor special teams play, which had a PAT blocked in the first quarter after Jimmie Ward's pick six and allowed a 74-yard kick return after Gabbert's TD run. He finished with 196 yards through the air on 18-of-32 passing and added 75 yards rushing on six attempts.

The 49ers, who were allowing 464 yards per game on the road this season and on pace to finish with the highest average in NFL history, gave up 364 yards.

They also won their first road game (1-5) and ended a seven-game road losing streak, dating back to last season.

"Wins are always needed," said Niners coach Jim Tomsula. "You play the game to win.

"A night like tonight is why I really do it for them."

Blaine Gabbert rushed for 75 yards and a touchdown to help power the 49ers to a 26-20 overtime victory against Chicago. AP Photo/Charles Rex Arbogast

What were they thinking? The 49ers did not throw a pass on first down until their fourth possession and, with only 5 yards of total offense at that point, were too predictable. Then came a first-down pass that jump-started a 16-play, 81-yard drive. What took so long?

One reason to get excited: The 49ers appeared to figure out their third-down deficiencies in the second quarter, successfully converting three in a row during that 16-play drive after going two for their previous 23.

One reason to panic: After calling up Daniel Kilgore and waiving linebacker Shayne Skov on Saturday, the 49ers were without both of their inside linebackers for a spell and an outside linebacker. Kilgore did not play a single snap at center, showing up as an extra tight end in the third quarter. Wait, what?

Fantasy watch: Gabbert was a fantasy beast with 196 yards passing and a touchdown and 75 yards rushing with a score. Impressive, especially after a slow start.

Ouch: In the first half alone the Niners lost both starting linebackers with Michael Wilhoite aggravating an ankle injury and NaVorro Bowman taking a blow to the head while tight end Vance McDonald suffered a concussion. Only Bowman returned to the game, on the second snap of the second half, and he had to switch helmets after a few plays. Outside linebacker Aaron Lynch then suffered a head injury in the third quarter.

And the game ball goes to: Jimmie Ward. The defensive back’s 29-yard pick-six tied the score at 6 when the Niners had just 5 yards of total offense. It was his first career interception and marked the first time the Niners scored a touchdown in the first quarter this season.

Up next: The Niners (4-8) travel to Cleveland to take on the Browns (2-10) in what was supposed to be an elimination game for the No. 1 overall pick in next spring’s draft.