Ainsley Maitland-Niles had given Arsenal the lead with his first PL goal on 11 minutes, but shortly afterwards Firmino turned the match on its head with two goals in as many minutes.
Sadio Mane extended Liverpool’s lead on 32 minutes before Mohamed Salah drew a foul from Sokratis and scored the resulting penalty in first-half stoppage time.
In the second half, Firmino completed his hat-trick with a penalty after Sead Kolasinac had fouled Dejan Lovren.
After Tottenham Hotspur’s 3-1 defeat to Wolverhampton Wanderers, unbeaten Liverpool stretched their lead at the top with their ninth PL win in a row.
Third-placed Manchester City will move to within seven points if they win at Southampton on Sunday.
Arsenal remain fifth with 38 points.