Liverpool star Mohamed Salah, already a national hero in Egypt, netted the fifth and decisive spot-kick as the Pharaohs progressed to the quarter-finals.
The two nations could not be split following a tense 90 minutes and with the match still goalless after extra-time, they went to penalties.
Premier League stars Nicolas Pepe, Wilfried Zaha and Maxwell Cornet all hit the target for Ivory Coast, but one miss would prove costly.
Taking his side's third spot-kick, Bailly failed to deliver with a short run-up, seeing his tame effort tipped onto the crossbar by Egypt goalkeeper Mohammed El Shenawy.
Egypt made no mistake with their penalties and it was Salah, their talisman, who was given the opportunity to send them through.
The Liverpool hero sent Badra Ali Sangare the wrong way with a cool finish into the bottom-right corner to keep Egypt's hopes of AFCON glory alive.
Salah and co. will face Morocco in the last-eight on Sunday.