Northern Ireland defender Gareth McAuley scored an own goal in the 75th minute of the match.
McAuley directed the ball in his own net after a cross by Gareth Bale of Wales from the left flank.
Wales will play against Hungary or Belgium in the quarterfinals in Lille on Friday.
Anadolu Agency