Wing Mack Hansen was held up over the Wales line by Murray, but Prendergast kicked a 67th-minute penalty that edged Ireland back in front before adding a long-ranger and a further three-pointer that saw them home, despite Ellis Mee’s late effort that was ruled out following several replays.
A second Anscombe penalty further narrowed the gap, then Prendergast hit the post from distance and there were signs of Ireland losing their composure as Wales staged a strong finish to the opening 40 minutes.
Wales 18-27 Ireland: Wales ultimately fell to a 15th successive Test match defeat but started the post-Warren Gatland era with plenty of positives.
He booted five penalties and a conversion in total, with No 8 Jack Conan and full back Jamie Osborne scoring tries, while Wales replied with touchdowns from captain Jac Morgan and wing Tom Rogers, plus two Gareth Anscombe penalties and a conversion.
Wales, with an entirely changed front row from the one on duty against Italy last time out, gained three scrum penalties inside the opening 16 minutes, but they also found themselves defending for long spells.