The hosts threatened to heap yet more misery on the Catalan giants following their back-to-back defeats against Ajax and Athletic Bilbao when Rodriguez Fernando fired them into a 16th-minute lead.
Pedro began the Barcelona fightback with the leveller after 36 minutes while Cesc Fabregas bagged a second after 43 minutes to ensure the Primera Liga side went in with the lead at the interval.
The visitors continued to labour after the break and 76 minutes were on the clock when Pedro made it 3-1, while the scoreline finally began to take on a more expected look in the final minute when Jean-Marie Dongou made it four.
Real Betis also found their first-leg assignment hard work as they struggled to break down the 10 men of third-tier Lleida before posting a 2-1 win.
The hosts lost goalkeeper Pau Torres to a red card after five minutes and although Betis went in at the break with a 2-0 lead thanks to Joan Verdu’s 27th-minute penalty and a Jorge Molina strike (43), they failed to build on their advantage after the break.
Indeed the only goal after the re-start went the way of the 10 men, with Pena Pere Milla reducing the deficit ahead of the return leg in the 57th minute.
Real Sociedad were another La Liga side to labour against Segunda Division B opposition as they drew 1-1 at Algeciras.
Sociedad went ahead in the 59th minute through Antoine Griezmann but Algeciras secured a deserved draw when Jesus Alfaro levelled five minutes later.
Villarreal and Elche drew 2-2 in an all-La Liga clash. Villarreal took the lead in the 22nd minute through Giovani Dos Santos but Elche turned the tie around thanks to Sergio Pelegrin (60) and Richmond Boakye (66).
The visitors were just seconds away from leaving El Madrigal with a creditable away win to take into the return leg but Javier Aquino rescued a draw for Villarreal in stoppage time.
Sevilla were 1-0 winners at Racing Santander thanks to Jairo’s fifth-minute strike. The visitors lost Coke to a second yellow card after 52 minutes but Racing were unable to force an equaliser.
The night’s remaining match between Real Valladolid and Rayo Vallecano finished goalless.