Ibrahimovic penalty settles Barca derby
Champions Barca and second-placed Real were missing key players, with Lionel Messi out of the Catalan derby due to an ankle sprain and the suspended Cristiano Ronaldo and injured Kaka absent for the Valencia clash.
After a tight first half at the Mestalla, Real's Argentina striker Higuain broke the deadlock in the 54th minute with a header from Karim Benzema's cross before league top scorer David Villa equalised with his 12th of the season on the hour.
Marcelo set Higuain up to drive home his second five minutes later, Valencia substitute Joaquin made it 2-2 after 80 minutes and Real defender Ezequiel Garay, who replaced the injured Pepe just before the break, headed the winner three minutes later.
"It was a very important victory against one of our direct rivals," Higuain said in a television interview.
Barca top the standings on 39 points from 15 matches, five ahead of Real who have a game in hand.
Higuain's Argentina team mate Messi was injured in Wednesday's Champions League victory at Dynamo Kiev, but was in the Nou Camp earlier on Saturday to show the fans the Ballon d'Or award he won this month.
His replacement, Pedro, fluffed a chance to put Barca ahead in the 14th minute when he robbed Francisco Chica but skewed his shot wide with Carlos Kameni's goal at his mercy.
Victor Valdes had to be alert to keep out Joan Verdu's dipping strike seconds later before Kameni acrobatically palmed away Thierry Henry's low effort.
Sweden striker Ibrahimovic converted a penalty in the 39th, after Baena impeded Xavi, giving Kameni no chance with a drive high into the net for his 11th goal of the season.
Espanyol put up more of a fight in a scrappy second half but were unable to find an equaliser and Ibrahimovic and Gerard Pique went close to doubling Barca's lead.
"We knew it was going to be tough," coach Pep Guardiola told a news conference. "We played a very good first half but the reward was scant."
Barca now travel to Abu Dhabi to take part in the World Club Cup where they will face CONCACAF champions Atlante in the semi-finals on Wednesday.
They are bidding for a sixth trophy to go with their Spanish and European Champions League titles, the King's Cup and the Spanish and European Super Cups.
Their win over Espanyol equalled the club record of 15 consecutive league matches undefeated set under Terry Venables at the start of the 1984/85 season.
Earlier on Saturday, teenage striker Iker Muniain came off the bench to inspire Athletic Bilbao to a 2-1 win at promoted Real Zaragoza which prompted the sacking of home coach Marcelino.
"Results are indisputable because they are not a matter of opinion and definitively condition decisions," Zaragoza president Eduardo Bandres said at a news conference. "The statistics are extremely bad."
Supporters at the Romareda had earlier unfurled a banner saying "These fans don't deserve such humiliation," and the defeat left Zaragoza just above the relegation zon