The visitors struck twice inside two minutes at Tallaght Stadium as the game entered its final throes to leave Noel King's men empty-handed and with no chance of snatching a play-off place.
Wolves defender Matt Doherty's header had given Ireland an 11th-minute lead as the home side got off to the perfect start in a game they really had to win.
But FC Twente frontman Luka Djordjevic levelled with 15 minutes remaining and Mugosa, who plays his club football in Montenegro with Mladost Podgorica, won it three minutes later to leave the visitors in pole position behind Group 6 leaders Germany.
The Republic dominated the first half, but had only Doherty's lone goal, which came from an Anthony Forde corner, to show for their efforts at the break.
They continued to enjoy the better of the game after the restart, but could not increase their advantage, and they were eventually made to pay.
Djordjevic drilled a 75th-minute shot past keeper Sean McDermott to set the stage for Mugosa to head home the winner.
Ireland's misery was complete two minutes into stoppage time when full-back Sean McGinty was sent off for a second bookable offence.
King's men slipped to fourth place in the group as a result of their defeat and Romania's 3-1 home victory over the Faroe Islands.
They will finish their campaign away to leaders Germany in September knowing even a win there will not be enough to rekindle their chances of making it to the finals in the Czech Republic in June next year.
- Sports & Recreation