The Reds had a terrible start when keeper Alisson, in his first friendly game, dropped a simple cross and then fouled Moussa Dembele - with Memphis Depay scoring the penalty.
But Roberto Firmino spun and fired an equaliser, before Joachim Andersen's own goal from Ki-Jana Hoever's cross.
Harry Wilson smashed in a fantastic 25-yard strike after the break.
The result gives Liverpool a morale boost going into Sunday's Community Shield with Manchester City.
They had failed to win in their previous four friendlies against Borussia Dortmund, Sevilla, Sporting Lisbon and Napoli.
It was a first pre-season game for Alisson, Brazil team-mate Firmino and Egypt's Mohamed Salah, who all returned to training on Monday after the Copa America and Africa Cup of Nations respectively. Senegal's Sadio Mane - who arrives back next week - was the only notable absentee,
Some 27 players played for Liverpool during the game, with two changes made at 30 minutes, three more at half-time and then an all-new 11 coming on after an hour.