The Terriers frustrated Newcastle throughout the match and looked set to hold on for a vital point until Perez pounced on Kenedy's cross in the 80th minute to clinch a 1-0 victory.
Rafa Benitez' men took a huge step towards Premier League safety in doing so and now sit in 12th, seven points above the relegation zone, but Huddersfield remain just three points away from the bottom three.
Not only did the Magpies extend Huddersfield's winless run in the league to four games, but the West Yorkshire outfit drew blank for the 18th time this season, the second most in Europe's top five divisions.
Here is how the Town players were rated in another disappointing Premier League encounter.
Lossl's efforts deserved clean sheet
Jonas Lossl (8) - In his first Huddersfield match since agreeing to join permanently in the summer, he made a number of good saves, most notable to deny Dwight Gayle in the first half and Matt Ritchie in a one-on-one situation, and kept the team in it throughout a first half onslaught.
Tommy Smith (5) - The skipper replaced Florent Hadergjonaj, who also joined permanently during the international break after a fine debut season in England, to start for the first time in six games but struggled to contain Kenedy's excellence before being substituted.
Christopher Schindler (6) - He did well alongside 'Zanka' as they limited Newcastle to just three shots on target and it turned out to be the attack that was the downfall in the end once again.
Mathias Jorgensen (7) - The Dane came closest to being an architect for Huddersfield as he saw his diving header almost helped in by Collin Quaner when the score was level, but also did his defensive duties well.
Terence Kongolo (6) - There was nothing to shout about regarding Kongolo's performance at left-back, apart from that he kept Matt Ritchie relatively quiet.
Flatness in attack costs Terriers again
Jonathan Hogg (5) - Town's no. 6 is normally the heart of the midfield but failed to conduct the match as he normally does, which left the defenders at risk of being exposed at times.
Aaron Mooy (5) - The Australian put on another lacklustre showing in the middle of the park and did not shine the world alight with his playmaking abilities like it is known he can do.
Rajiv van La Parra (6) - He was probably the visitors' largest threat on the ball when attacking but didn't do anything notable enough to make a difference before being replaced by Scott Malone in the latter stages.
Alex Pritchard (5) - Just like his fellow attackers, Pritchard was not allowed to make a difference against Newcastle's dominant midfield.
Elias Kachunga (4) - Kachunga could miss the rest of the season after going off for Collin Quaner before the hour mark with a nasty looking injury, but failed to make an impact prior to the unfortunate incident.
Laurent Depoitre (7) - You can't fault the big Belgian's hard work to hold the ball up and use his physicality to try and cause problems, but he was isolated on too many occasions and had a frustrating day.
Collin Quaner (6) - Looked bright after coming on early in what was his side's best period of the game. (for Elias Kachunga, min. 56).
Steve Mounie (N/A) - (for Tommy Smith, min. 83).
Scott Malone (N/A) - (for Rajiv van La Parra, min. 86).