Foles replaced Mitchell Trubisky at quarterback midway through the third quarter with the Bears down by 16.
The veteran signal-caller threw an interception during his first drive but later managed three straight touchdown drives in the fourth quarter, including a game-winning 28-yard completion to wide receiver Anthony Miller.
Chicago's defense forced multiple three-and-outs after the scoring streaks, which turned the game in their favor.
Ryan completed 19 of 38 pass attempts for 238 yards and one touchdown with one interception during the loss.
Foles finished the tilt with 188 passing yards on 16 completions.
The Bears are 3-0 to start the season for the first time since 2013. Chicago outgained Atlanta in total yards (437-371) and first downs (24-22).
The Falcons remain winless, falling to their first 0-3 record since 2007. They suffered a double-digit fourth-quarter collapse in their last two games.