Josh Magennis put Stephen Robinson's side ahead in the 10th minute and they took the 1-0 cushion to half-time only for the visitors to equalise just after the break.
Stefan Spirovski levelled for Macedonia in the 48th minute before Filip Timov edged his side ahead and Aleksandar Stankov sealed the win in the last minute.
The loss does not change the fortunes for Robinson's team as their hopes of qualifying for the finals had already evaporated prior to this match.
They lost 1-0 to Macedonia in their first qualifier in Skopje in May thanks to a late penalty and have also been defeated at home by Serbia and Denmark.
Northern Ireland have four points from seven games and complete their qualification campaign against Denmark on Monday.