Ryan's scoring throws were for 42 and 5 yards to Roddy White and 12 yards to Marty Booker.
Atlanta (8-7) also scored on an 11-yard fumble return by Lawrence Sidbury and a 51-yard Matt Bryant field goal.
Ryan finished with 18 completions in 35 throws for 250 yards.
If the Falcons beat Tampa Bay next week, they'll have back-to-back winning seasons for the first time in the history of the Atlanta franchise.
Rian Lindell got Buffalo's points with a 42-yard field goal.
Brian Brohm, in his first NFL start, was 17-of-29 passing for 146 yards and two interceptions for the Bills (5-10).
Notable deaths of 2014 [PHOTOS]