Baltimore (4-3) used a 17-0 second quarter to build a 19-0 halftime lead.
Flacco threw a 70-yard second-quarter touchdown pass to wide receiver Demetrius Williams and scored on a 12-yard fourth-quarter run. He finished with 12 completions on 24 passes for 140 yards.
Running back Willis McGahee scored once and gained 58 yards on 23 carries, while rookie running back Ray Rice rushed for 64 yards and added three catches for 37 yards in the Ravens' second straight victory.
Oakland quarterback JaMarcus Russell was 15-of-33 for 228 yards, one touchdown and one interception. He was tackled in the end zone for a safety in the second quarter.
Chaz Schilens caught three passes for 76 yards and Justin Griffith caught Russell's two-yard third-quarter scoring pass for the Raiders (2-5), who have dropped four of five.