Wales opened the scoring after 7 minutes when Sion Spence met a cross from the right and drilled a low shot past Oliver Webber.
Northern Ireland pressed strongly and Luke Ferguson was narrowly off target with a header from a corner by Jordan McEneff.
On the half hour Northern Ireland deservedly drew level with a brilliant goal as McEneff netted with a 25 yard drive into the top corner of the net. Soon afterwards Alex McIlmail went close but his fierce drive from the edge of the box was deflected over the bar.
After the interval Northern Ireland continued to force the pace but Leo Brown could only shoot straight at the keeper when well placed. Brown then again tested the keeper who did well to tip his header over the bar.
Wales always looked dangerous on the breakaway and Rabbi Matonda outpaced the Northern Ireland defence but his shot went inches wide. With six minutes remaining the speedy winger made the vital breakthrough for the hosts as he cut in from the left and calmly lifted a shot over the advancing Webber.
With Northern Ireland pushing forward in search of the equaliser a freak goal settled the issue in the fourth minute of added time as a wind assisted clearance from the half way line by Steffan Buckeley flew over Webber and into the net.
This win meant that Wales retained the Victory Shield while Northern Ireland finished as runners up.
Northern Ireland: Oliver Webber, Sean Wallace, Ian Maxwell, Keith Kearney, Luke Ferguson (c), Jordan McEneff, Jack Chambers, Leo Brown, Caolan Boyd, Alex McIlmail, Ethan Warnock.