Warning: spoilers ahead for the midseason finale of The Flash Season 3, called "The Present."
The Flash has spent most of Season 3's first half building the mystery of Doctor Alchemy and and his master/god known as Savitar. We learned a couple of episodes ago that the meta-hating Julian is the man behind the Alchemy mask, but the mystery of Savitar remained. There was no time like "The Present" for The Flash to scare the pants off viewers with a closer look at Savitar's powers and why he's so set against Barry. As it turns out, Barry is responsible for somehow defeating and trapping Savitar in the future, and the villain intends to use his prescient knowledge to battle the Scarlet Speedster.
Team Flash didn't waste any time in figuring out that Julian doesn't actually know that he's Doctor Alchemy. Julian has been blacking out for years, ever since he led an archaeological dig in India to try and find what is being called the Philosopher's Stone. Savitar managed to use Julian's grief (from his sister's death) to lure him to the Philosopher's Stone, take over his body, and turn him into his sporadic minion. Julian didn't find a way to reunite with his sister, but instead freed the self-described god of speed who was apparently the very first speedster metahuman.
Unfortunately for Team Flash, Savitar moved too quickly for any of them to see, aside from Barry, Wally and a visiting Jay Garrick. They jerry-rigged a doohickey to allow them to speak to Savitar through an unconscious and strapped-down Julian, and the antagonist ranted and raved about being wronged by the Flash. Barry apparently found a way to capture Savitar in the Philosopher's Stone, which stops Savitar from escaping unless somebody opens it from the outside. The god of speed was understandably miffed that Barry confined him for what seems to be quite a long time, and he fully intends to strike back at where Barry is most vulnerable. (And heaven help anyone who makes an I Dream of Jeannie comparison.)
Barry and Jay used their speed to fling the Philosopher's Stone (and Savitar) into the speed force and theoretically contain him forever, but Barry ended up popping out into the future rather than back in the present. There, he witnessed a tragedy courtesy of a very free Savitar that could explain why "Iris West-Allen" is no longer the author of a future newspaper article about The Flash. To the surprise of exactly nobody anywhere, Barry now wants to meddle with time to stop the tragedy from unfolding.
Going by Savitar's knowledge of the future, however, Barry may be in for more than one tragedy no matter what he does. Savitar teased that one of Barry's friends will betray him, another will fall, and another will suffer a fate worse than death. He intended to get back everything that Barry took from him and then destroy everything that Barry holds dear in vengeance.
Savitar is the third speedster supervillain in three years on The Flash, so the show really needed to get creative to make him truly menacing in a way we hadn't seen before. After all, last year's midseason finale involved Zoom literally breaking Barry and then parading him around Central City to the shock and despair of its citizens. This year's midseason finale needed to get dark and dastardly to outdo Zoom, and I'd say it succeeded. Barry and Co. probably have a very rough ride ahead of them in the second half of Season 3.