There remains plenty of work to do for the Premier League leaders, who will be disappointed they were unable to gain a bigger advantage for next week's second leg.
On a bitterly cold night at Anfield, Liverpool were well below their best and Porto deserve credit for a determined performance after going two goals down in 26 minutes.
"We lost a little bit of direction in the second half, but there's nothing to criticise, 2-0 is a very, very good result," said Liverpool manager Juergen Klopp.
"We knew we had to play the second game and we cannot decide the tie tonight, so now we have to go there and fight again," he added.
The visitors fired an early warning shot with Moussa Marega blasting narrowly wide in the second minute but the home side took the lead three minutes later through a Keita shot which deflected off Porto midfielder Oliver Torres and beat the helpless Iker Casillas.
Mohamed Salah then forced Casillas into a low save with a sharp shot on the turn, but the Egyptian should have done better in the 22nd minute when he placed the ball wide when through on goal, after being played in by a sloppy Porto pass.
Liverpool had their second four minutes later -- Jordan Henderson split the Porto defence with a superb pass to Trent Alexander-Arnold, whose low cross was tapped in from close range by Firmino
The Brazilian should have added to his tally, but blasted over after a good cross from Henderson, who was again enjoying a more advanced midfield role.
Porto though showed they were not about to roll over -- the dangerous Marega had a low drive well saved by the legs of Liverpool keeper Alisson Becker.
The visitors also felt they should have had a penalty when the ball struck Alexander-Arnold's arm as he shepherded it out but after a VAR review the appeal was rejected.
Sadio Mane had an effort ruled out for offside three minutes after the interval, but apart from another Marega chance in the 69th minute there were few clear-cut opportunities in the second half.
The Portuguese side fought well to stay in the game in a scrappy second half to give themselves a chance of a comeback at home in next week's second leg.
They will, however, be angered when they see television replays of Salah's over the top, raised studs challenge on Porto's Danilo Pereira five minutes from the end for which he could easily have been dismissed.
Although Spanish referee Antonio Mateu Lahoz gave a foul Salah did not even receive a yellow card.
(Reporting by Simon Evans; Editing by Toby Davis)