These ones are back to the regular spoiler level, after the weekend’s “well, there’s a scene in a car…” vagueness.
The episode’s title comes from an episode-long debate between Robin and Marshall over whether miracles happen – if you’ve ever seen a single episode of this show, it should be easy to guess that Marshall believes, and Robin doesn’t. Marshall cites the time he got head lice from a pilgrim hat in Lily’s classroom (thus preventing him from getting his job back after he quit in The Chain of Screaming, thus saving him from the SEC investigation that hit the two weeks later), the time a shift change at customs saved him from getting busted on his way home from Amsterdam, and a night with Lily when he was able to perform especially well. Robin, for the disbelievers, cites the time her sick dog was “miraculously” cured, but turned into a turtle as a side effect of the treatment. [It was an embarassingly long time before Robin realized her parents had made the switch - we'll see a flashback to six-year-old Robin and her turtle.]
Ted is in a car accident – the hospital calls Marshall, his emergency contact, who tells Lily, who tells Barney [obviously someone tells Robin, I just don't know how it happens]. Given that the script later mentions Ted and Stella cuddling in his hospital bed [rather than, say, Stella clutching Ted's comatose body], it doesn’t sound like he’s too badly hurt. [It's possible that that's the potential miracle they're debating.]
Barney is also hurt somehow, but it’s much later in the episode – Ted, still in the hospital, receives a call [he's Barney's emergency contact], and Future Ted voiceovers that whatever happened to Barney was set in motion when Lily called him about Ted’s accident.