Ruben Aguilar completed the turnaround deep into added time, firing into the bottom corner in the 93rd minute after Lens had twice come from behind.
Slavia made the stronger start and should have taken the lead inside the opening minute when Danijel Sturm raced into the box, only to drag his shot wide.
Sturm was involved again moments later when he delivered a dangerous cross towards Stepan Chaloupek, but the defender could not keep his header on target.
Lens gradually settled and began to threaten, with former Slavia forward Abdallah Sima missing a good opportunity after being played through by Florian Thauvin.
Matthieu Udol also went close for the visitors, forcing Jakub Markovic into two saves from a corner, while Slavia had a goal ruled out after Emmanuel Ayaosi was judged to have handled the ball.
The first half ended goalless despite plenty of attacking action, but the game exploded into life immediately after the break.
Slavia substitute Mikulas Konecny was sent off following a lengthy VAR review for denying a clear goalscoring opportunity, leaving the hosts with 10 men.
Thauvin nearly punished Slavia from the resulting free-kick, but the home side responded brilliantly.
Sturm then gave Slavia the lead with a superb finish into the top corner, sending the home supporters into celebration.
Lens pushed forward in search of an equaliser and came close when Tomas Vlcek produced an important goalline clearance to deny Thauvin.
The visitors eventually broke through when Sima finished from close range against his former club to make it 1-1.
Slavia refused to collapse despite playing with 10 men and regained the lead when Sturm struck again after a scramble inside the penalty area following a free-kick.
Lens, however, kept attacking and were rewarded again in the 91st minute when Thauvin headed past Markovic to level the match at 2-2.
With the game seemingly heading towards a draw, Lens delivered one final blow.
Aguilar collected the ball on the edge of the box and calmly found the bottom corner in the 93rd minute to complete an extraordinary comeback.
The victory gives Lens their first away win in European competition since September 2005 and extends their unbeaten record in European opening matches to five games.
For Slavia, the defeat extended their miserable run in UEFA competitions to 16 matches without a victory, despite twice holding the lead against a 10-man Lens side.