AFCON 2015: Ivory Coast 0 Ghana 0 (pens 9-8)
Barry - who appeared to be struck down by cramp on two occasions during the shootout - was only selected because Sylvain Gbohouo picked up an injury in the Ivory Coast's semi-final.
He saved the spot-kick of opposite number Brimah Razak, before stepping up himself to convert the winning kick as the Ivory Coast lifted the trophy for the second time.
The Ivory Coast's only previous triumph in this tournament also came against the Black Stars, courtesy of an epic 11-10 shootout success in Senegal in 1992, and history was to repeat itself at the Estadio de Bata on Sunday.
It was also a repeat success for their coach Herve Renard, who lifted the trophy in 2012 when his Zambia side defeated his current employers, also on penalties.
All three of the Ivory Coast's previous final appearances had ended goalless, and it was the same story in Bata as the two sides could not separated after two hours of scoreless action.
For Ghana coach Avram Grant, it was yet more penalty heartache after his Chelsea side lost out to Manchester United in the 2008 UEFA Champions League final.
Ghana looked the more likely to find a winner throughout normal time, both Christian Atsu and Andre Ayew striking the woodwork, but otherwise goalmouth action was scarce.
Both sides were fortunate to finish the game with 11 men on the field. Serey Die was booked for a dangerous studs-up challenge on Wakaso Mubarak - which could have resulted in a red - before the Stuttgart midfielder escaped unpunished for a subsequent cynical foul on Atsu.
Returning Ghana forward Asamoah Gyan trod on the foot of Eric Bailly off the ball in the first half in an incident that went unseen, before his team-mate John Boye was lucky to get away with a headbutt on the same opponent after the interval.
Both sides made one change following their semi-final victories as Barry replaced Gbohouo, while Ghana welcomed back Gyan in place of Jordan Ayew.
The first effort of note saw Yaya Toure bring a simple save out of Razak with a free-kick in the 14th minute, before Die was perhaps fortunate to receive only a yellow card for a high boot which caught Mubarak in a sensitive area.
Max Gradel fired off target from a difficult angle in the 16th minute, and Gyan was lucky that referee Bakary Gassama did not spot an off-the-ball stamp on Bailly.
Atsu went agonisingly close to an opener when his thumping drive got the better of Barry but rebounded off the right-hand upright and away to safety 25 minutes in.
Die, having already been cautioned for his earlier transgression, was extremely lucky not to be shown a second yellow card when he scythed down Atsu a minute later.
Ghana hit the woodwork again nine minutes prior to the interval, as Andre Ayew sliced his attempted cut-back off the left-hand post.
There was little let-up in the feisty nature of the encounter after the break when Boye appeared to headbutt Bailly after the pair grappled while waiting for a free-kick, but once again there was no action from Gassama.
Boye headed wide of the target midway through the second half as Ghana continued to look the most likely to make a breakthrough.
In the final minute of normal time, Serge Aurier broke free down the right and saw his dangerous cross parried by Razak, but Jonathan Mensah was on hand to hack the ball away before substitute Seydou Doumbia could provide the finish.
After extra-time proved uneventful, Ghana looked in control of the shootout when Wilfried Bony and Junior Tallo missed the first two kicks for the Ivory Coast.
However, Afriyie Acquah and Frank Acheampong also erred for Ghana, and as the shootout reached its 11th round, Barry saved from Razak.
The Ivory Coast stopper, who had gone down with cramp earlier during the kicks, fell to the ground again but, after receiving treatment, managed to pick himself up and successfully convert the winning penalty to spark scenes of jubilation among his team-mates.