David Akers booted three field goals in the late surge that enabled the Eagles to even their record at 3-3.
Donovan McNabb completed 23 passes for 280 yards and two touchdowns, with one interception.
The Eagles forced three turnovers in the final quarter.
Philadelphia running back Correll Buckhalter, starting in the place of Brian Westbrook, who has a rib injury, ran for 93 yards and a touchdown and caught seven passes for 85 yards.
The 49ers' J.T. O'Sullivan was17-of-30 passing for 199 yards and two interceptions.
Frank Gore ran for 101 yards and a touchdown and Donald Strickland returned a blocked punt for a score in the third straight loss for the 49ers (3-3).
Justin Bieber crashes Drake Bell's album release party
Members of Congress to keep receiving porn magazine