49ers fall to Cardinals 19-13 on Carson Palmer’s late TD run

There might not be moral victories in professional sports, but there is something to be said for not being absolutely eviscerated in a loss.

Just ask the sad-sack 49ers.

On Sunday, two months removed from a 40-point beatdown in Arizona, the 49ers hung with the Cardinals, a Super Bowl contender who entered as 10-point road favorites.

In the end, the expected blowout was won by Arizona, which escaped with a 19-13 victory on quarterback Carson Palmer’s 8-yard touchdown run with 2:28 left. In the San Francisco locker room, the players offered a series of we’re-paid-to-win-games quotes, but this was clear: The 49ers preferred to lose merely a game, not their dignity as well.

“I’m encouraged,” inside linebacker NaVorro Bowman said. “Guys that didn’t have as much confidence in this team saw something. … Today was a demonstration of the type of team we have to respond after all the turmoil we’ve been through.”

That turmoil includes a 3-8 record, with six of those losses coming by at least 14 points. The 49ers arrived on the heels of a 29-13 loss in Seattle in which they surrendered their most rushing yards (255) in 37 years. The lifeless performance inspired a legitimate question: Had their desire dissolved along with their postseason hopes?

San Francisco 49ers' Vance McDonald fumbles the ball out of bounds while being tackled by Arizona Cardinals' Tony Jefferson in 4th quarter of Arizona's 19-13 win during NFL game at Levi's Stadium in Santa Clara, Calif., on Sunday, November 29, 2015. less San Francisco 49ers' Vance McDonald fumbles the ball out of bounds while being tackled by Arizona Cardinals' Tony Jefferson in 4th quarter of Arizona's 19-13 win during NFL game at Levi's Stadium in Santa ... more Photo: Scott Strazzante, The Chronicle Photo: Scott Strazzante, The Chronicle Image 1 of / 60 Caption Close 49ers fall to Cardinals 19-13 on Carson Palmer’s late TD run 1 / 60 Back to Gallery

The 49ers still aren’t going to the playoffs, but they proved Sunday they still have some pride. The Cardinals (9-2), who arrived leading the NFL in points (33.6) and yards (417.3) per game, had their second-fewest point and yardage totals (337) of the season.

“They've had a tough season,” Palmer said, “but they came to fight.”

Recommended Video:

Some of that defensive fight was instilled by head coach Jim Tomsula, who implored the 49ers to tackle aggressively after he attributed a slew of missed tackles against the Seahawks to a tentative approach. On Wednesday, Tomsula opened the first team meeting of the week with that message, which evidently was effective: The Cardinals had 70 rushing yards and averaged 2.4 yards a carry.

Tomsula “attacks his words,” outside linebacker Eli Harold said. “His words attack you, but he wasn’t pissed off. It was, ‘Be aggressive!’ He was just telling us what we had to do and we did it.”

The defensive effort was commendable, but it appeared it would be wasted, given the state of the 49ers’ 32nd-ranked offense. After the Cardinals grabbed a 13-3 lead early in the third quarter, the 49ers took possession without having scored a touchdown in 65 minutes and 11 seconds of game action.

However, quarterback Blaine Gabbert, who threw for 226 of his career-high 318 passing yards in the second half, led two third-quarter scoring drives. In a six-play, 77-yard touchdown march he capped with an 8-yard toss to tight end Vance McDonald, Gabbert had a 48-yard, across-the-field throw to rookie tight end Blake Bell.

On the next drive, which ended with a game-tying field goal by Phil Dawson, Gabbert fired a 41-yard down-the-middle strike to wideout Torrey Smith.

In the third quarter, Gabbert completed 7 of 8 passes for 143 yards and a touchdown, posting a perfect passer rating (158.3).

“Blaine’s playing awesome,” Smith said. “Some of the plays he made — I think he’s able to showcase his skills, and prove that he belongs in this league and he can be a serviceable starter. Blaine can play ball. I’m just glad he can go out and prove it.”

In his first three starts since 2013, Gabbert has played better than expected, but his solid performances have produced an average of 14.3 points a game. In their past two games, the 49ers have converted 2 of 20 third downs (0 of 9 Sunday) and scored touchdowns on two of five red-zone trips.

Trailing 19-13, the 49ers reached Arizona’s 30-yard line on their last-gasp drive. Their hopes were extinguished when Gabbert completed an 18-yard pass to wideout Anquan Boldin on 4th-and-20 with just more than a minute left.

Later, Gabbert echoed many of his teammates. They weren’t satisfied, but might have been a bit relieved they weren’t humiliated.

“We’re in the business of winning and losing,” Gabbert said. “It’s never fun when you’re on losing side.”

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

3 notables

QB Blaine Gabbert: He threw for a career-high 318 yards and posted a perfect passer rating (158.3) in the third quarter while leading two scoring drives.

CB Tramaine Brock: He dropped a would-be interception, allowed a 48-yard completion and was called for illegal use of hands.

RB Shaun Draughn: The well-traveled journeyman might have found a home. He had 86 total yards (51 rushing, 35 receiving).

— Eric Branch