Daniel Sturridge, making his first Champions League start in over six years, headed Liverpool into the lead after 30 minutes at Anfield.
James Milner made it 2-0 from the penalty spot shortly afterwards, only for Thomas Meunier to reply before half-time and Kylian Mbappe to level in the 83rd minute after a subdued second half.
However, Firmino, who did not start due to an eye injury suffered against Tottenham on Saturday, ensured Liverpool started their Group C campaign with a win as he fired in a low shot in injury-time.