In 2012, he starred in the thriller Gone, the supernatural horror film The Apparition, and began a recurring role in Once Upon a Time as the Mad Hatter. The A. V. Club described his work in "Hat Trick", his premiere episode, as "excellent" and placed the episode in their list of the 30 best episodes of 2012 from series which did not make their top list. It was initially reported the role would be recast for the spin-off series Once Upon a Time in Wonderland, due to Stan's commitment to the Marvel Cinematic Universe, but Edward Kitsis later revealed the next month that due to fan backlash and respect for Stan's performance, the character would not be recast and the series would proceed without the character. The same year, he also appeared in the USA Network miniseries Political Animals as the troubled gay son of the former First Lady, for which he was nominated for the Critics' Choice Television Award for Best Supporting Actor in a Movie/Miniseries. In 2013, Stan played Hal Carter in the Roundabout Theater Company's production of William Inge's Picnic, at the American Airlines Theater in New York.