Carlo Ancelotti's men won the corresponding fixture last term with Mertens' spot-kick and Llorente's injury-time goal enough to ensure history was repeated in the Group C clash at the Stadio San Paolo on Tuesday.
Andy Robertson was deemed to have tripped Jose Callejon in the box and, after VAR ratified the penalty decision, Mertens squeezed his penalty past Adrian in the 82nd minute.
Liverpool rode their luck in reaching the knockout rounds in 2018-19 and Jurgen Klopp's men will again have to bounce back from an away loss to Napoli this year after Llorente's first goal for the club sealed all three points.
Napoli had an early strike ruled out for offside when Hirving Lozano headed home the rebound after Adrian's excellent double save from Fabian Ruiz.
Sadio Mane's shot was saved by Alex Meret in the 20th minute - Liverpool recording their first shot on target in the game having failed to manage any in last season's visit.
And the Reds should have gone into the break 1-0 up, Firmino heading wide a fine James Milner cross on the Brazil forward's 200th Liverpool appearance.
Napoli had the first big chance of the second half, Adrian showing superb reactions to prevent Mertens from turning in Fabian's deep cross, then Mane overhit a pass to Mohamed Salah as Liverpool broke at speed.
Liverpool were starting to build pressure and, after successive errors from Kalidou Koulibaly and Kostas Manolas handed him a sight of goal in the 65th minute, Salah's drive was turned around the post by Meret.
Napoli's goalkeeper had to deny Mane again as Liverpool looked to finish strongly, but when Callejon jinked into the box he went over Robertson's outstretched leg to win a penalty.
Mertens had to wait for the VAR check, but calmly drilled his strike past Adrian, with Virgil van Dijk's terrible error in stoppage time ensuring former Tottenham striker Llorente could ease home a second.