“Threshold” is episode two of season five of Stargate SG-1.
In the previous episode, “Enemies”, Teal’c had been freed from Apophis (who is finally, extremely and permanently dead, after his Replicator-infested ship crashed into his new homeworld – even with his energy shield, this is not a death he’s coming back from), but he had been brainwashed into believing Apophis was a god again by the sarcophagus. He now appears to be back to his old self, but Bra’tac, who is visiting, can see through his deception – Teal’c still believes the Goa’uld are gods.
Bra’tac’s method of helping Teal’c see the truth again is to remove his symbiote, and take him to the edge (the ‘threshold’) of death – using a method that has never been successful before.
Lots of scenes from Teal’c and Bra’tac’s past. It’s not really a flashback episode though.