Retcon was introduced in Torchwood, and first appeared in the first episode, "Everything Changes"; Jack spikes Gwen's drink with it:
Jack: How's your drink?
Gwen: Have you poisoned me?
Jack: Don't be so dramatic. It's an amnesia pill. My own recipe, with a touch of denial and a dash of Retcon. Wake up tomorrow morning, you'll have forgotten everything about Torchwood. Worse still, you'll have forgotten me, which is kind of tragic.
Torchwood Season 1 Episode 1: "Everything Changes"
"Face the Raven" is its first (and, so far, only) mention in live-action Doctor Who. There is a reference to an "amnesia gas" in the 2009 animated special "Dreamland", which may be a prototype Retcon, but this isn't confirmed.