Ibanez became the first player to homer twice in a postseason game in which he didn't start, STATS said.
Phil Hughes will try to clinch it for the Yankees on Thursday night in Game 4. Joe Saunders will start for Baltimore.
Baltimore had won 16 straight extra-inning games, and had been 76-0 when leading after seven, before the Yankees stung them.
"It was a great experience. We do it as a team. We stay after it," Ibanez said. "I'm blessed to come up and have the opportunity like that. We do it together. it's about a team and about winning."
The brash, young Orioles appeared poised to move within a win of their first trip to the AL championship series since 1997 before the Yankees' comeback.
Ibanez hit a 1-0 pitch into the seats in the ninth, setting off a raucous celebration in what had been a demoralized Yankee Stadium crowd.
After their 10-game July lead was cut to zero in early September, the Yankees repelled every Orioles charge. The teams were tied 10 times in the final month but New York ended up atop the division.
New York won the opener in Baltimore scoring five runs in the ninth off Johnson. The Orioles won Game 2 and rode Miguel Gonzalez's pretty performance to a 2-1 lead in the ninth.
But the Yankees limited Baltimore to one hit after 20-year-old Manny Machado homered in the fifth. Ryan Flaherty homered earlier for the Orioles.
Robert Andino was doubled off second after leading off the Baltimore ninth with a single and advancing on a sacrifice.
Boone Logan got one out in relief of Hiroki Kuroda, who gave up two solo homers in 8 1-3 innings. Closer Rafael Soriano pitched 1 1-3 innings and David Robertson went two, finishing off his outing by bumping into and tagging Andino to end the top of the 12th.
Derek Jeter tied the score with an RBI triple in the third for the Yankees. Jeter, limping after fouling a ball off his foot, came out after eight innings. He says we will be able to play Thursday.
NOTES: Rivera threw out the ceremonial first pitch.