The Uruguayan scored his first Liga goal in a comfortable win for the home side.Luis Suarez opened his La Liga account as Barcelona comfortably beat Cordoba 5-0 to move a point behind leader Real Madrid.
The Uruguay international has struggled to impose himself in Spain since his big-money move from Liverpool, but he finally netted his first league goal for the club in his eighth outing as Barca cruised to victory on Saturday.
Luis Enrique's men were held at Getafe in their last league match, but a repeat never looked likely as Pedro's effort 72 seconds in gave the hosts a fine start at Camp Nou.
Pedro and Gerard Pique saw further chances go begging before the break, but the Catalan giants doubled their lead early in the second half when Suarez ended his Liga goal drought from close range.
Pique nodded in number three in the 80th minute and Lionel Messi struck twice in the last eight minutes as Barca closed the gap to Real – currently in Club World Cup action – with an impressive display to end the year on a high note.
Luis Enrique opted to leave Neymar on the bench despite the Brazilian overcoming an ankle injury, with Pedro's Copa del Rey hat trick against Huesca earning the Spain international a start in La Liga.
And the coach's decision was vindicated with just over a minute played, as Ivan Rakitic's lofted pass picked out Pedro's darting run and the forward coolly steered past Juan Carlos.
Barcelona continued to dictate the game and went agonizingly close to doubling its lead in the 12th minute, but Suarez's acrobatic volley from a Jordi Alba cross found the side netting.
It did not take long for Barca to extend its lead in the second half. Pedro drove into the left side of the area in the 53rd minute and cut the ball back for Suarez, who prodded the ball under Juan Carlos.
Barca almost scored again just a few moments later, but midfielder Rakitic's venomous long-range drive rattled the post.
Juan Carlos was beaten again 10 minutes from time, though, as Pique headed Xavi's corner past the helpless goalkeeper and Messi, who had been quite by his high standards, grabbed a fourth with a tidy finish into the top-left corner after another set-piece was not cleared.
Messi completed the rout in stoppage time, brilliantly bringing down Alba's cross before slamming beyond Juan Carlos with a clinical finish to take his tally to 15 La Liga goals for the season and end another prolific year in style.