© Getty Images
After a quiet spell, the hosts had a chance to break the deadlock shortly before half time when Simon Mignolet failed to clear a corner, leaving Papiss Cisse with a free shot at the Liverpool goal, but Glen Johnson was on the line to make the clearance.
Cisse had another chance from a free kick just before the half-time whistle, but the striker curled his effort well high of the goal.
The Italian forward tested the Newcastle keeper again shortly before the hour mark, but once again the Dutch international claimed it comfortably.
The missed opportunities proved costly as the home side took the lead with just over 15 minutes to play, as Alberto Moreno tried to block a Paul Dummett ball into the box, only to hand it to Perez, who rifled the ball past Mignolet.
The Magpies could have put the result almost beyond doubt a few minutes later when another Moreno mix-up let Remy Cabella in with just the keeper to beat, but Mignolet just got his fingertips to it to force it wide.
The Belgian keeper continued to come under pressure as Newcastle tried to double their lead late on, but Cabella and Sissoko were both frustrated by Mignolet.
Balotelli attempted to set up an equaliser for the visitors with just a couple of minutes to play, crossing the ball in for Moreno, but his shot did not worry Krul.
The result moves Newcastle into the top half of the table, level on points with Manchester United, while Liverpool sit seventh.