The early stages were open with both sides showing good attacking intent inside the first 10 minutes.
It was Northern Ireland who were rewarded for their positive play in the 14th minute when Martin Paterson controlled the ball well before drilling a low shot into the bottom corner to give his team the lead.
The hosts were inches away from equalising on the half-hour mark but Lars Gerson's effort struck the crossbar after beating visiting goalkeeper Roy Carroll.
Luxembourg continued to threaten and Aurelien Joachim found the goal the home side deserved on the stroke of half time with a deflected strike to leave Carroll helpless in the Northern Ireland goal.
The visitors were clearly hurt by the goal in stoppage time and they were once again on the back foot early in the second half.
Some desperate defending from Northern Ireland restricted the number of chances created by Luxembourg and the away side looked threatening on the break.
Billy McKay should have put his side ahead late on after taking the ball past Luxembourg goalkeeper Jonathan Joubert but he failed to hit the target with his effort from a tight angle.
Northern Ireland were made to pay for that missed chance with 12 minutes left on the clock when Stefano Bensi fired a shot past Carroll after being allowed too much space.
However, it appeared that the visitors had secured a point when Gareth McAuley found space to head home an equaliser in the 82nd minute.
Luxembourg refused to settle for a draw though and they scored a dramatic winner just six minutes later when Janisch took advantage of some sloppy defending to drill home from close range and earn his side all three points.