Flacco connected with rookie Torrey Smith on a 38-yard TD to give Baltimore (7-3) a 31-14 lead early in the fourth quarter. Smith finished with six catches for 165 yards, while Ray Rice ran for 104 yards and two scores.
The Bengals (6-4) got to the Baltimore 7 in the final minute but could not score the tying touchdown.
The victory moved the Ravens into a first-place tie with Pittsburgh, but Baltimore is 2-0 against the Steelers and holds the tiebreaker advantage.
Bengals rookie quarterback Andy Dalton threw for 373 yards but was intercepted three times.