4th-quarter TD drive lifts 49ers over Washington

Recommended Video:

With the game on the line and the ball in midair late Sunday afternoon, Anquan Boldin knew he was in perfect position to make a huge play ... and take a huge hit.

Fortunately for the 49ers, the 12th-year veteran shrugged off that last detail.

In a 17-13 win over Washington at Levi’s Stadium, the 49ers’ winning touchdown with just less than three minutes left was set up by a 29-yard strike from Colin Kaepernick to Boldin, who caught the ball in a safety sandwich.

Boldin, 34, was in the middle of Trenton Robinson and Ryan Clark, the latter of whom delivered a hellacious blow at Washington’s 34-yard line. The result?

Boldin, who remained upright before he was tackled by cornerback Bashaud Breeland, had a heck of a catch.

Clark, who stayed down on the field, had a headache — and also was charged an unnecessary-roughness penalty.

Three plays later, rookie running back Carlos Hyde’s 4-yard run with 2:59 left provided the winning points.

San Francisco 49ers' Carlos Hyde celebrates his 4th quarter touchdown run with Colin Kaepernick and Alex Boone during 17-13 win over Washington during NFL game at Levi's Stadium in Santa Clara, Calif., on Sunday, November 23, 2014. less San Francisco 49ers' Carlos Hyde celebrates his 4th quarter touchdown run with Colin Kaepernick and Alex Boone during 17-13 win over Washington during NFL game at Levi's Stadium in Santa Clara, Calif., on ... more Photo: Scott Strazzante, The Chronicle Photo: Scott Strazzante, The Chronicle Image 1 of / 37 Caption Close 4th-quarter TD drive lifts 49ers over Washington 1 / 37 Back to Gallery

And about 30 minutes later, Boldin was posed this question: What was he thinking after he emerged unscathed and Clark stayed on the ground? Boldin, who missed just two games in 2008 after facial fractures were repaired by 40 titanium screws and seven metal plates, said he was fortunate.

“Honestly, you’re just thankful,” Boldin said. “You just thank God that you didn’t come out on the other end of that. Because I’ve seen it and I’ve been a part of it where it goes the other way.”

If not for Boldin’s nine-catch, 137-yard, one-touchdown performance, Sunday’s game could have gone the other way against an opponent that entered the day 3-7 and on the heels of a 20-point home loss to lowly Tampa Bay.

Thanks to another uninspiring effort from the NFL’s 18th-ranked offense, the 49ers trailed Washington by three points before Kaepernick engineered his first fourth-quarter touchdown drive of 2014. The eight-play, 75-yard march included a 3-yard run by Frank Gore on 4th-and-1 from the 49ers’ 34-yard line and allowed the Niners (7-4) to enter Thursday night’s matchup with the Seahawks (7-4) on a three-game winning streak.

But can the 49ers beat Seattle if they duplicate Sunday’s offensive effort? The totals: 16 first downs, 312 yards, and three points in the 53 minutes after Boldin provided a 7-0 first-quarter lead with a 30-yard catch.

The 49ers will meet Seattle having scored three touchdowns in their past 10 quarters, plus a nearly 10-minute overtime session. On Sunday, they had five punts, three turnovers and a field goal in between their touchdown drives.

Head coach Jim Harbaugh, not surprisingly, was in glass-is-half-full mode.

“We turned the ball over, and some teams will hang their heads when that happens,” he said. “But that’s not what this team’s about. This team’s about each other. They’re about the team, the team, the team. Not into criticizing each other. ... Guys just kept playing and fighting. That’s what good teams do.”

On Sunday, the best part of the team was the defense, which has allowed 23 points in the past two games. The 49ers limited Washington to 12 first downs, 213 yards and a 15 percent third-down-conversion rate (2 of 13). Quarterback Robert Griffin III (106 passing yards) took more sacks (five) than he delivered passing first downs (four).

Washington’s lone offensive bright spot was running back Alfred Morris (21 carries, 125 yards), who tied the game 7-7 with a 1-yard run in the second quarter.

“The defense played their butts off,” Boldin said. “I think (the offense) played well in spurts, but we shot ourselves in the foot. I felt like we got in a rhythm and just started making mistakes here and there. That’s the thing about offense: It takes all 11 guys to do their job. If one guy doesn’t do his job, it breaks down.”

Boldin, who passed Derrick Mason, Hines Ward and Charlie Joiner to move into 20th in career receiving yards, used his great hands and grit to do his job quite well.

Safety Antoine Bethea, who spent his first eight seasons with the Colts, said he’s glad he can call Boldin a teammate instead of trying to tackle him.

“I know when we used to play against him, when he catches the ball, you better bite down on your mouthpiece,” Boldin said. “Because he is going to bring a thump, too.”

On Sunday, Boldin took the thump and remained standing. Outside linebacker Aldon Smith was among those impressed: He said his teammate could play with him on the other side of the ball.

“Yeah,” Smith, “he could be a safety.”

Eric Branch is a San Francisco Chronicle staff writer. E-mail: ebranch@sfchronicle.com Twitter: @Eric_Branch

3 notables

OLB Aldon Smith: In his second game back from a nine-game suspension, Smith was in midseason form. Matched against rookie LT Morgan Moses, he had two sacks and once bull-rushed the third-round pick several yards back into Robert Griffin III.

RB Frank Gore: For the second straight Sunday, Gore lost a fumble, his latest leading to a FG that gave Washington a 13-10 fourth-quarter lead. He had 36 yards rushing, his third-lowest total of the season, and averaged 2.8 yards a carry.

DT Justin Smith: The 14th-year veteran sealed the win with a blindside sack and strip of Griffin, whose fumble was recovered by OLB Ahmad Brooks.