Goals from Milivoje Novakovic and substitute Zlatan Ljubijankic in the 84th and 85th minute did the damage in the Group Three clash in Maribor.
And a miserable night was capped in injury-time when influential defender Jonny Evans picked up a booking - the province's fifth of the night - which means he will be suspended for Wednesday's home match against San Marino.
It was a heartbreaking end to the match for the Nigel Worthington's team, who had shown good discipline until the last six minutes.
Worthington made four changes to his side for the match at the Ljudski VRT Stadium, with Steven Davis, Kyle Lafferty, Gareth McAuley and Grant McCann all returning after missing the 0-0 draw against the Czech Republic.
Backed by 1,200 fans, the province were looking to kickstart their campaign after taking one point from two qualifiers.
West Brom midfielder Robert Koren captained Slovenia, out to maintain their bright start in Group Three.
Manchester United defender Evans had recovered from a virus and was able to take his place in the side.
Worthington had called on his team to use the venue like a home game as the stadium's capacity is similar to Windsor Park.
However, Slovenia were the first to show and Mirnes Sisic fired a shot wide of the post in the fifth minute.
Northern Ireland, though, were knocking the ball around well in the early stages of the game.
Slovenia were keeping a close eye on David Healy, who was looking to break his duck in the campaign after scoring a record 13 goals in the Euro 2008 qualifiers.
The home fans screamed for a penalty in the 18th minute when Chris Baird bundled over Zlatko Dedic but Spanish referee Eduardo Gonzales allowed play to continue.
The province almost took the lead two minutes later when Lafferty showed good reactions to get on the end of a cross from McAuley only for his effort to finish the wrong side of the post.
It was a sign the side was growing in confidence in front of a partisan home crowd.
Northern Ireland had appeared to take heart from the home draw against the Czech Republic last month and were playing with no little confidence.
Davis missed that game and seemed to be making up for lost time. He was becoming increasingly influential in the middle of the park and was also getting forward to support Healy.
Rangers midfielder Davis cracked in a shot which went across the face of the goal in the 28th minute after Keith Gillespie's effort had only been half-cleared.
Six minutes later Davis strode forward again as the Slovenia defence backpedalled and powered in a shot that was deflected over the bar.
The home crowd were suddenly muted at this show of aggression from the province and Worthington's side could be satisfied with their first-half performance.
The visitors kept their shape well at the start of the second half and looking disciplined at the back.
Certainly Evans was not showing any effects from the virus he had suffered from at the beginning of the week - forming a good partnership with Aaron Hughes to keep Slovenia at bay.
Healy suddenly burst into life in the 58th minute and tried to chip the goalkeeper, only for his effort to go over the crossbar.
Northern Ireland kept pushing forward with Lafferty also a threat in the air.
Slovenia had taken four points from their first two qualifiers but were finding the province a tough nut to crack.
The stylish Koren was trying to get the home side going and showing some nice touches but the game was finely balanced.
Lafferty then took advantage of a loose backpass and raced forward, only to see his effort come off the chest of the goalkeeper in the 64th minute.
However, the visitors were rocked back on their heels in the space of a minute when Slovenia scored twice to seal the points.
Milivoje Novakovic made the breakthrough in the 84th minute and then substitute Zlatan Ljubijankic added a second to leave the province heartbroken.