The visitors looked down and out when the Slovenians stormed ahead with Dalibor Volas opening the scoring in the 11th minute and a Donk own goal and a second from Volas making it 3-0 with 68 minutes gone.
But two goals in three minutes from Moroccan Nabil Dirar gave Brugge hope and after Joseph Akpala equalised on 81 minutes, Donk fired home in added time to give his side a famous win.
The dramatic victory means Club Brugge go into their final group match against Braga knowing a draw will be enough to earn them a place in the knockout phase at the expense of Birmingham. Braga secured their qualification with a 1-0 win over the Championship side with Hugo Viana striking a 51st-minute winner. However, Birmingham will still go through if they beat Maribor in their last game and Brugge are beaten.
Ukrainians Metalist confirmed their qualification at the top of Group G with an emphatic 4-1 win over Austria Vienna, who still have a chance to join them after AZ slipped up against group whipping boys Malmo. Metalist made no mistake in Kharkiv with Marko Devic opening the scoring in the 19th minute and hitting back after Florian Mader's equaliser, with Edmar, Papa Gueye and Jose Sosa wrapping up victory.
AZ would have joined Metalist in the knockout stage with a win in Malmo, but gifted the Swedes their first point in a goalless draw. AZ still know a win in their final game at home to Metalist will be enough.
Atletico Madrid booked their passage from Group I with a 1-0 win over Celtic in Glasgow. Arda Turan scored the winner on the half-hour for the visitors, but Celtic were handed a lifeline with the news Udinese slipped up at Rennes. The already-eliminated French side clung on for a goalless draw against the Serie A title contenders, meaning Celtic will head to Italy for their final group game next month in the knowledge that a win will send them through.
Tottenham's hopes in the balance
Jermain Defoe had a late goal disallowed for Tottenham as 10-man PAOK Salonika secured qualification for Group A with an action-packed and controversial 2-1 win at White Hart Lane. Dimitris Salpigidis and Stefanos Athanasiadis put the Greeks 2-0 in upside the opening quarter of an hour but Spurs hit back with Luka Modric's 39th minute penalty after Konstantinos Stafylidis was harshly sent off for handball.
Spurs poured forward and laid siege to the visitors goal with Defoe bundling home in the 80th minute amid chaos, with Pablo Contreras lying injured on the goal-line and Dutch referee Bas Nijhuis taking some time to make his decision. The defeat, coupled with Rubin Kazan's 4-1 stroll against pointless Shamrock Rovers, leaves Harry Redknapp's men needing to beat Rovers in their final game and hope PAOK beat the Russians with a six-goal swing.
Earlier, Rubin made it look all too easy against the outclassed Irishmen, with two goals from Nelson Valdes and one each for Bibras Natcho and Obafemi Martins, while Ken Oman scored for the visitors.
Standard Liege beat Hannover 2-0 in Belgium on a night which earned both clubs qualification from Group B, with Copenhagen blowing their chance after being held to a 1-1 draw at Vorskla. Goals from Mohamed Tchite and Gohi Cyriac earned Standard their win, while Copenhagen's Dame N'Doye cancelled out an earlier own goal with a strike at the right end, but it did not prove enough to keep the Danes in the hunt.
PSV Eindhoven guaranteed top spot in Group C with a 3-0 win over Legia Warsaw in Poland. Stanislav Manolev, Dries Mertens and Zakaria Labyad scored to keep the Dutchmen's unbeaten record intact.
Legia also qualified after Rapid Bucharest fell to a 3-1 home defeat to Hapoel Tel Aviv. Nosa Igiebor and Toto Tamuz put Hapoel 2-0 ahead and despite Ciprian Deac's penalty, Salim Toama secured the Israeli's first group win.