Flacco hit Torrey Smith for an 11-yard touchdown in the third quarter and found Crockett Gillmore with a 21-yard pass in the fourth one play after Terrell Suggs picked off a pass by Ben Roethlisberger.
The Ravens won in Pittsburgh for the first time in the postseason.
Baltimore sacked Roethlisberger five times and kept the NFL's second-ranked offense off-balance. Roethlisberger passed for 334 yards but the Steelers had to settle for field goals.
Baltimore will play at top-seeded New England on Saturday.
"The big thing is we have a good team and we didn't hurt ourselves tonight," Flacco said. "We didn't have a lot of possessions early. We made the most of them by getting some kind of points."
The Ravens won their third wild-card game as the sixth-seeded team.
Flacco's seven road playoff victories are the most by a quarterback since the 1970 merger. He completed 18 of 29 passes for 259 yards and the two touchdowns. The Ravens gained a measure of revenge after the Steelers knocked them out of the postseason in 2008 and 2010.
Pittsburgh fell to 9-1 when facing a team for the third time in the same season. Baltimore's 13-point victory was the fourth-biggest by a road team in Steelers postseason history.
Flacco escaped pressure from James Harrison to find Smith in the back of the end zone to make it 20-9 in the third quarter. Pittsburgh drew within 20-15 on a six-yard pass from Roethlisberger to Martavis Bryant with 11:01 to go.
Justin Tucker made a 52-yard field goal to push the lead to 23-15 and Suggs made a juggling interception from his knees on Pittsburgh's ensuing possession.
The Ravens then put the Steelers away. Flacco rolled right and flipped to Gillmore. The tight end outraced two defenders to the end zone.
The teams split 20-point blowouts during the regular season, each winning at home. Roethlisberger peppered Baltimore's scattershot secondary for six touchdowns in a 43-23 victory Nov. 2.
This time, without the threat of Bell, the Ravens simply sent their front seven after Roethlisberger.
Baltimore got there with frequency.
Twice the Steelers' momentum in the first half was stopped when Roethlisberger was sacked, including one by Haloti Ngata in his return from a four-game suspension for violating the NFL's performance-enhancing drugs policy.
Justin Forsett churned through the Steelers for 32 yards on an 80-yard drive that ended with a five-yard sprint to the end zone by Bernard Pierce. Tucker had a field goal and Baltimore led, 10-9, at the half.