Barca, winners of the event 30 times and in four of the past five seasons, rested Lionel Messi and Gerard Pique but started Antoine Griezmann.
On a plastic pitch at the Can Misses stadium, Ibiza took a ninth-minute lead through Javi Perez. But France international Griezmann equalised after 72 minutes and added the winner deep into injury time.
With the capacity increased from 4,500 to a sell-out 6,445 especially for the first meeting between the teams, a carnival atmosphere intensified when Perez ghosted in to slot into the corner from 15 yards.
Barca’s pressure finally told midway through the second half when Griezmann levelled from similar range, evading his marker to collect a neat Frenkie de Jong through ball and stroke in left-footed.
Awarded a bye through to the last 32 in this season’s revamped structure, which comprises single-leg matches apart from the semi-finals, Barca needed the fourth minute of added time to secure victory in new coach Quique Setien’s second match at the helm.
In heavy rain, his team broke swiftly and Griezmann escaped again to dispatch another clinical left-footed finish.
Ibiza are managed by former Barca player Pablo Alfaro, who played alongside Setien for three years at Racing Santander.
Since the club was formed in 2015, replacing UD Ibiza-Eivissa and backed financially by president Amadeo Salvo, they have won promotion twice in three seasons to sit third in their Segunda Division B group and this was their first season in the Copa del Rey.