Gary Hooper put the visitors ahead before Emmanuel Emenike struck twice for the home side but the game turned Celtic's way when Spartak's Juan Insaurralde was sent off just past the hour.
Dimitry Kombarov's own goal put the Scottish champions level after 71 minutes before Samaras stunned the home crowd to leave Celtic on four points while Spartak stay bottom with none.
It was Celtic's first away victory in the continent's elite competition since a European Cup win over Shamrock Rovers in 1986. In the Champions League era, 19 of their 20 away matches had ended in defeat, including their previous 11 in a row.
"I can't speak highly enough of the players, they were magnificent, and they played magnificent football at a very tough venue against an excellent side," Celtic manager Neil Lennon told a news conference.
"We showed great character and fortitude to come back after going a goal down after half-time and I thought we thoroughly deserved the win."
Hooper silenced the home supporters when he put Celtic in front against the run of play in the 12th minute.
Victor Wanyama started the move by winning the ball in midfield and passing to Mikael Lustig, who quickly fed Hooper on the run. The striker wasted little time before firing low past Spartak's debutant goalkeeper Sergei Pesyakov.
The Russians equalised just before the break when Emenike fired in from close range after a perfect pass by Ari. The Nigerian scored again three minutes into the second half, tapping the ball into an empty net from Demy de Zeeuw's cross.
However, once Insaurralde was dismissed for a professional foul on Hooper Spartak were in trouble and Kombarov's own goal set the stage for Samaras to skilfully head the late winner.
Spartak winger Aiden McGeady blamed the sending off for the defeat, saying it took the wind out of Spartak's sails.
"Of course it was the key moment of the match," the Ireland midfielder, who joined Spartak from Celtic two years ago, said.
"We were up 2-1 but after that we didn't play well and allowed Celtic to score two easy goals because of complete disarray in our defence."
It was a cruel case of deja vu for Spartak, who had led Barcelona 2-1 in their group opener last month before Lionel Messi's two late goals gave the Spaniards a 3-2 victory.
The Muscovites badly missed experienced keeper Andriy Dykan, sidelined for a month after injuring his shoulder in a league game at the weekend.
Pesyakov, making his debut in European competition, looked shaky in goal, although the 23-year-old could hardly be blamed for any of the three goals Spartak conceded.
They dominated the match on the Luzhniki Stadium's artificial turf for long periods before Insaurralde's dismissal but wasted numerous chances and eventually paid the price.
Spartak's Spanish coach Unai Emery said: "We must take
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.