Neymar went close for Luis Enrique's men as they increased the pressure on the APOEL goal. The Brazilian raided down the left and cut inside on his right foot before blazing an effort just wide of the target.
Barcelona went ahead in the 28th minute as they won a free kick down the right when Dani Alves was fouled. Messi curled the set piece towards the near post where it was met by Pique, who headed his effort into the bottom corner.
Enrique's side nearly doubled their lead just before the break when Neymar broke down the left and picked a pass for Messi inside the box. The Argentine drilled a powerful shot at goal, but Pardo made a good save to beat the ball away.
In the second half, Neymar should have scored his side's second when Alves lifted a cross to the back post and the ball somehow made it through to the forward, but he could not make contact at the vital moment.
The visitors hit back and went extremely close to an equaliser as Nuno Morais latched on to a loose ball into the penalty area, and his shot looked goalbound until Marc Bartra deflected it over.
APOEL appeared to grow in confidence as Gustavo Manduca used his pace to break upfield and he tried to find the unmarked Cillian Sheridan in the box, but Alves managed to get back and stop the attack with a timely interception.
The Cypriot side should have levelled the scores when Manduca did well again down the right flank and cut the ball back for Tomas De Vicenti, but the forward got his shot all wrong and scuffed it wide from close range.
Sandro Ramirez nearly secured the three points for Barcelona when he raided forward and found space for a shot on the edge of the box, but his left-footed drive curled just the wrong side of the post.
Neymar and Messi nearly combined to seal the win but the Brazilian saw his shot well saved by Pardo and the Argentine was denied on the rebound by a covering block by Mario Sergio.
Marc-Andre ter Stegen kept his side ahead in the dying minutes as he produced a fine stop to turn an effort from Manduca over the bar, which was enough to earn his side the three points.