Arizona (10-6) rallied from a 17-0 first-quarter deficit to tie it on Carson Palmer's 34-yard touchdown pass to Andre Roberts with 3:20 remaining.
Anquan Boldin caught nine passes for 149 yards and a TD in his first game back since Arizona traded him to Baltimore after the 2009 season.
To make the playoffs, the Cardinals needed to beat San Francisco and have New Orleans lose to Tampa Bay. Neither occurred, leaving Arizona, in its first year under coach Bruce Arians, to settle for just its third 10-win season since the franchise moved to the desert in 1988.
Palmer, after a slow start, was 28 for 49 for 407 yards and two touchdowns with one interception. In the process, he became the first player in NFL history to throw for more than 4,000 yards in a season for three different teams. Larry Fitzgerald had six catches for 113 yards.
San Francisco's NaVarro Bowman had an interception, a forced fumble, a fumble recovery and a sack in the 49ers' ninth victory in the last 10 meetings with Arizona.
Boldin did most of his damage in the first quarter, with six catches for 106 yards, including a 4-yarder for a touchdown and a 63-yard play to set up another TD.
But that was it for the San Francisco offense until Dawson's late two kicks. In between the kicker's franchise record string of 27 consecutive field goals ended when he missed a 24-yard chip shot in the waning seconds of the first half.
Feely, who made a 49-yarder, had missed from 37 and 43 yards before making the one to tie the game for the last time.
Bowman's sack had put Arizona in third and 13 when Palmer lofted one to the end zone, where Roberts gathered it in just as he was sliding out of bounds on a slippery turf recently re-sodded for Tuesday's Fiesta Bowl.
Kaepernick's 18-yard pass to Boldin helped set up Dawson' 56-yarder, matching his longest, set in 2008.
Palmer, though, connected on passes of 24 yards to Rob Housler and 23 yards to Fitzgerald to give Feely a chance for redemption, and the kick that tied it at 20.
With the game seemingly headed for overtime, James raced from five yards deep in the end zone to the 49ers 40, then Kaepernick connected for 18 yards to Boldin and, in a play that started with just 18 seconds to play, a sidelines pass of 29 yards to Quinton Patton. Then Dawson's final field goal ended it.
Bowman's interception set up Boldin's first-quarter touchdown catch. Kaepernick also had a 3-yard TD pass to Vernon Davis.
Palmer and the Cardinals finally got going in the second quarter with a 12-play, 88-yard touchdown drive. On fourth-and-goal at the 1, Palmer threw to wide open Jake Ballard for the score to cut the lead to 17-7.