Remy had squandered a glorious chance moments earlier when he could only hit the post with the goal seemingly at his mercy, and it looked as though the Magpies were set to finish a fifth straight game without getting on the scoresheet.
However, he made space for himself in the area in the 92nd minute to fire past Brad Guzan and give Newcastle a valuable victory.
Newcastle went into the game having lost each of their last five fixtures in all competitions at St James' and with the club moving to deny that Alan Pardew's job was on the line if he did not remedy that situation against Villa.
The initial signs were positive as a team strengthened significantly by the return of Fabricio Coloccini and Cheick Tiote from injury and Remy from suspension set about their task in determined fashion.
Remy forced a second-minute save from Guzan with a well-struck effort and Papiss Cisse almost embarrassed the American eight minutes later with a drilled effort which he spilled, fortunately at the feet of team-mate Nathan Baker.
However, the wheels then rather came off for the Magpies as Villa found their feet and started to hit their hosts on the counter with the pace of Gabriel Agbonlahor a particular threat.
Midfielder Karim El Ahmadi had already fired across the face of goal twice when Agbonlahor forced a 19th-minute save from Tim Krul after Ashley Westwood had set him up, and he blasted a long-range effort inches over the crossbar seconds later.
Pardew, who had signalled his intention to play two strikers for the remainder of the season in his programme notes, swiftly abandoned the system in favour of a 4-5-1 formation, and while that helped to stem the tide, it did little to improve Newcastle's creativity.
Remy saw a 44th-minute free-kick just wide, but Cisse really should have scored in first half-injury time after being picked out by the Frenchman in front of goal, but his shot was too high.
Villa's efforts to deny the home side time and space proved effective and the Magpies became increasingly frustrated as they struggled to find any cohesion.
They did, however, with 53 minutes gone when Remy flicked Moussa Sissoko's pass into the path of Yoan Gouffran, whose right-foot shot flew just wide.
But with neither side able to retain possession for more than a handful of rudimentary passes, chances were few and far between.
However, left-back Paul Dummett when desperately close when he curled a 20-yard shot just over with 63 minutes gone, and Gouffran volleyed high and wide two minutes later with Newcastle pressing.
Tiote fired tamely at Guzan and Sissoko scuffed harmlessly wide as the home, then Remy forced a diving save from Guzan with a well-struck effort 10 minutes from time.
The home side were furious not to be awarded a penalty seconds later after the ball appeared to strike Leandro Bacuna's arm.
The Magpies should have snatched victory when substitute Luuk de Jong robbed Ron Vlaar on the goal-line and squared for Remy, who contrived to hit the upright.
But the France international redeemed himself two minutes into stoppage time when he spun inside the box to thump home left-foot volley past the helpless Guzan.