After a tepid start with a couple of tame attempts by Munir and Neymar, Barcelona went ahead just before the half-hour mark when Dani Alves received a nasty tackle from Marios Antoniades. With Dani Alves being treated on the sideline, Messi curled an in-swinging free kick into the area that Pique guided into the net.
After spending most of the first half camped in its area, APOEL managed to conjure a counterattack in the 64th that Dani Alves did well to halt.
Luis Enrique sent on Andres Iniesta, Ramirez and Rafina at intervals to try and spark his attack.
But it was forward Tomas De Vincenti who wasted a chance in the 79th when his strike sailed woefully wide after APOEL had caught Barcelona off-balance on the break.
Messi came close to adding to his 67 Champions League goals and close in on Raul Gonzalez’s record of 71 in stoppage time, when he pounced on a rebound of a Neymar strike, only for Mario Sergio to slide in and deny his goal-bound shot.
Ter Stegen then had to make a one-handed save off Gustavo Manduca’s rising strike to guarantee the win.