The movie starts off with Casey Beldon (Odette Yustman) jogging during the wintertime in a park. Stopping to take a breath on the running trail, Casey sees a glove on the ground. She picks it up and turns around, seeing a pale little boy with a missing glove. She stares again and the boy becomes a dog with a strange white mask on. The dog goes into the woods and Casey follows it. The dog is nowhere to be found but she does see the mask on the ground. When she tries to pick it up she finds that she has to dig into the ground to get the mask out and in the ground under the mask she sees a clear container containing a still developing baby in it, which opens its eyes.
It turns out to just be a dream and we see Casey lounging on a couch talking to her best friend Romy (Meagan Good). Casey wants to know what her dream means, so Romy consults a dream book. Romy says that in a dream a baby is symbolic of change and renewal and if it is a stranger to the dreamer then it is something in the dreamer not yet ready to be born, while the dog in mythology is often portrayed as the messenger of the dead. Romy then asks about the kids, and Casey says they're asleep (Casey is babysitting). However, she hears sounds upstairs above her and then through the baby radio, a child whispering, "Look in the mirror, some people are doorways", so Casey tells Romy that she has to call her back, and makes her way upstairs to check on the kids. Casey sees Matty, about four years old and the older of the two children, standing in front of the crib holding up a small mirror over his little brother telling him to "Keep looking." Casey comes closer to tell him to stop when Matty strikes at her with the mirror and says, "Jumby wants to be born now."
The children's parents come home and Casey leaves. Outside the house, Casey finds the same glove from her dream on the sidewalk. When she gets home she says goodnight to her dad and gets ready for bed. After turning out her bathroom lights she hears a knocking coming from her medicine cabinet. She turns the lights back on and opens the medicine cabinet; there is nothing there. In bed, we see a picture of a small girl and a woman, who should be assumed as a younger Casey and her mother (who the audience should assume is dead due to her absence that night). While Casey is asleep, the knocking from the medicine cabinet mirror continues.
In the morning, Casey is making breakfast. She is making eggs on a skillet, and when she cracks an egg onto the skillet, a giant insect comes out from the egg. Casey is shocked and surprised and throws the whole thing into the sink. Then, looking outside from the kitchen window, she sees Matty, the boy she babysat the night before, creepily standing on her driveway.
We then see Casey outside her college talking to her boyfriend Mark (Cam Gigandet) Romy, and her other friend Lisa (Rachel Brosnahan), explaining what happened during babysitting the night before. Romy explains that its bad luck for a baby to see its reflection before he/she is one year old, which prompts Mark to tell Romy that she is retarded.
We then see Casey at a lecture class where the professor asking rhetorical questions about the universe. Meanwhile, Casey hallucinates and sees Born Now on the chalkboard as well as the writing on her notebook saying, Jumby wants to be born now and again sees the insect from that morning on her hand. She freaks out and gets up which causes the professor to ask her if everything is all right. We then see Casey in the shower thinking about her dream about the pale boy and the baby in the woods. Casey and Romy are then in the locker room talking when Romy notices that one of Casey's eyes is weird. Casey and her boyfriend go to the eye doctor and the doctor explains that it is heterochromia, which is when a person has a different eye color on each eye, which can occur if that person has gone through blunt trauma, and the doctor takes some pictures of her eye to make sure it is not melanoma. Walking out from the doctor's, Casey thanks her boyfriend for going with her and tells him that her dad isn't going to be home until the next morning. Then, across the street, Casey sees the same pale boy in her dream looking at her. However, he disappears.
We see Casey and boyfriend in bed. Her boyfriend talks about how afraid he is of what the professor was saying about the universe. Casey tells him about visiting her mother for the last time at a mental institution. Casey says the last time she saw her mother it had looked like she had just given up already; to this day, she is still mad at her mother for leaving her and her father.
We then see Casey in her bathroom when the knocking happens again. She opens the cabinet to check for what could be making the sound. She leaves the bathroom when she hears more knocking. This time she opens the cabinet and the pale boy from her dream is in there. She is shocked and screams, prompting her boyfriend to come to the bathroom. He checks the cabinet and sees that there's nothing in there. Casey then removes the mirror from the cabinet and puts the mirror in her closet.
Casey goes out on a run and sees a commotion outside of the house of the family where she babysat. A neighbor tells her that the baby stopped breathing, as we see a cart carrying the baby out and the mother crying and not believing that her infant is dead. Casey sees Matty on the upper floor staring at her through the window.
Back at the eye doctor, he tells Casey that everything looks fine, but asks if she was a twin, as that could explain why her eye colors are different, because in the case of twins, blood often transfers between the two fetuses when the placentas fuse.
Casey visits her dad at his office and asks him if she is a twin. He says that she had a twin brother who died while still inside their mother, as one of the umbilical cords suffocated him. Casey asks if that was why her mother killed herself, and her dad says that she was clinically depressed. He tells her that although it was too early in the pregnancy for the two to have names, they did have nicknames, with Casey's brother being Jumby (the name that keeps coming up in Casey's hallucinations).
Casey is looking through old photos, finds a film reel, and sees the name Sofi Kozma circled in an article titled Holocaust Survivor Remembers For Those Who Can't. She goes to a nursing home with Romy to visit Sofi Kozma. Casey notices that in Sofi's room there used to be a mirror, but Sofi says she had it removed. Sofi asks Casey if she was a twin, and Casey says she had a twin, and Sofi says she can tell because she also used to be a twin. While handing Sofi the article she found, Casey notices that Sofi is wearing the same red bracelet she had seen on her mother. Casey asks Sofi if she knew her mother, and Sofi replies that she did not. However, when Casey shows her the photograph and points out the boy, Sofi freaks out and tells them to get out.
Outside, Romy tries to tell Casey that this is all just a series of coincidences. However, Casey asks her if she believes in ghosts, to which Romy says of course. Casey asks Romy if she thinks if it is possible for someone who hasn't even been born to haunt you.
Casey's boyfriend gets a film projector so Casey can play the film she found in her mother's things. The reel is a movie of a hallway that leads to a big door, and when the film ends her boyfriend asks her if it meant anything to her. Casey says yes, and that beyond that door was where her mother hung herself. Casey and her boyfriend go out that night with Romy and Lisa to a rave. While her boyfriend gets them drinks, Casey sees the little boy among the dancers. She goes to the bathroom to put water on her face and throws up in the toilet. In her stall there is a drawing of an eye, she looks through it and insects and blood come pouring out. She runs to the door but it is locked and the insects and blood start coming out from the sinks and fingers come out from the wall. Casey is freaking out and she sees her mother reaching out to her from a bathroom stall.
Later that night, Casey is videochatting with Romy and tells her that she saw her mother in the bathroom. To protect herself that night, Casey then takes Romy's advice of putting scissors with the blades open under her pillow to ward off evil spirits. Casey wakes up and sees herself floating up on the ceiling watching herself sleep. The covers are pulled down and Casey sees the pale boy is in bed next to the sleeping Casey, opening her stomach to put himself in.
Casey screams and is woken up from the dream by a phone call. It is Sofi Kozma who tells her that she must come back to the nursing home to talk to her. Sofi reveals that she is her grandmother and that the pale boy in the photograph is her brother, and therefore Casey's great-uncle Barto. Barto died in the concentration camp in Auschwitz during the Holocaust. Nazi doctor Josef Mengele had an obsession with twins, believing that they would unlock the secrets of genetics. Being twins, Sofi and Barto were used by the Nazis in experiments that blurred the line between science and the occult, performing such experiments as trying to make brown eyes blue. Some of their experiments resulted in blindness while others caused death. Sofi says that her brother died when they injected his eyes, but two days later he "came back." However, Sofi knew that the boy was no longer her brother but a 'dybbuk'. These are spirits that are barred from heaven and therefore roam between worlds, explaining why Matty told Casey that "Some people are doorways" and that since twins are mirror images then they are considered doorways between different worlds.
Sofi says she killed the spirit that took over Barto, but it has been trying to get back into this world ever since, and that it had tried to get back through Casey's mother. When Casey's brother died, the spirit turned its gaze on Casey and has been circling her ever since. Casey asks how she could get rid of it and Sofi talks about a Book of Mirrors, which has the rites of exorcism in it and refers Casey to a rabbi, Josef Sendak, who could help her.
Casey goes to a library for the Book of Mirrors and brings it to the rabbi. She catches Rabbi Sendak (Gary Oldman) ending a group session and asks him if he can read the book. As the book is written in Hebrew, he can, and explains that it is taken from the Kabbala (Jewish mysticism). Casey tells him that she needs to have an exorcism performed on her, but the rabbi does not believe her and tells her that the spirits aren't real and were used in the middle Ages to explain ailments that people couldn't explain back then. In addition, if he were to perform the exorcism, Casey would have to believe in the religion. However, he sees that Casey is distraught and says that he could do a little research. Casey asks him to keep the book and translate it for her, as her life depends on it.
There's a flashback of Sofi giving Casey a necklace with the Star of David and the Hand of Miriam, which could help protect her. She tells Casey to get rid of all the mirrors in her home by breaking them and burning the pieces and burying them. Also she tells Casey to put up wind chimes because they signal when a spirit is present.
Romy is driving to Casey's house when she accidentally runs over Matty on his bike. When she gets out of her car to check if he's okay, Matty is standing up as if he hadn't been run over. He tells Romy "He doesn't like you helping her" and that if she keeps helping her, then he will kill her.
Arriving at Casey's house, Romy explains what happened and notices that Casey's eyes are getting worse. She asks Casey what's happened to her, as she doesn't go to class anymore, answer her phone calls, etc. Casey says that Sofi, her grandmother, told her everything and that a spirit or demon is after her, so it wasn't safe to be around her anymore. Romy says that she is her best friend and she is not leaving her.
Later that night, Casey watches the film reel again, and this time in the movie, she sees the dog with the mask from her dreams in the hallways as well as a child's arm reaching around the big door. She wakes up from the dream and hears the wind chimes, signaling the spirit's presence.
At the nursing home, Sofi also wakes up and hears the wind chimes. She prays and tries to turn her bedside lamp on. The lamp is not working, so she uses a flashlight. Also down the hallway the lights do not work and she notices that Eli, the paralyzed man also living in the nursing home, is awake. She makes her way downstairs and then sees Eli's wheelchair turned over. Then she sees Eli a flight below her crawling on all fours. His head turns all the way around and he chases her down flights of stairs. She manages to hide in a closet; behind her is the little boy and she screams.
Casey and Romy arrive at the nursing home in the morning and see an ambulance and police. They go in (Eli, back in his wheelchair, stares at her passing by), past the yellow police lines, and see the dead Sofi. Casey cries and leaves the nursing home and an old lady follows them outside to give Casey a letter Sofi left behind in case something happened to her. In the letter, Sofi tells her that it is up to Casey to stop the spirit. Casey's mother lost the battle and gave in. Sofi writes that the spirit feeds on fear and will try to isolate her from her family and friends.
Meanwhile, the rabbi is translating the Book of Mirrors in his office. When he tries to turn his desk lamp on he finds that it doesn't work. He uses a flashlight, goes down the stairs and arrives at the temple's room of worship where the altar and pews are. At the altar a dog whose head is completely upside down is growling at him. The rabbi tells the dog to go away from this place, the lights turn on, and the dog is gone.
Casey and Romy are videochatting and Romy tells Casey that Casey doesn't even really know if the spirit is after her. Casey says it is and that it's going to hurt everyone that she loves, that it would come get her when she had no strength left, and that's what happened to her mother. Romy hears someone ringing her doorbell and leaves her room to get it although Casey tells her not to. While Romy is gone from her room, Casey notices that the boy is in Romy's mirror so Casey calls Mark and tells him to meet her at Romy's house because something is wrong.
At Romy's house, her lights go out as she is going down the stairs. She opens the door. and it's Matty telling her that the doorway is open now. Matty then stabs Romy in the stomach with a knife. Romy tries to run away up the steps and Casey and Mark arrive at Romy's. The front door is locked so they go around through the back. Mark breaks one of the glass panes of the door to get in and they run up the stairs. They find Matty standing over Romy and Mark pulls him away from Romy and is about to attack Matty when Casey tells him to stop because "it's not in him anymore." They look over and see that the demon is now possessing Romy's body.
Later at a diner, Casey and her boyfriend are talking. Casey tells him that she 'thinks that the spirit is from this universe'.
The next day Rabbi Sendak brings Casey and her boyfriend to a basketball court. There he introduces them to the basketball coach, Arthur Wyndham (Idris Elba), who happens to be an Episcopalian priest. Casey doubts that his religion would be able to help her but the priest says that there are a lot of elements that are universal to different religions and that he could help. Casey accepts their help and asks when they can do the exorcism. They say that they can do it the next evening and that they should do it at a place where Casey has felt a lot of pain.
She therefore takes them to her mother's mental institution, which is now abandoned. There Rabbi Sendak explains that they are using 10 people (Sendak, Wyndham, Mark, and 7 others) to help with the exorcism because it is a mystical number in the Jewish religion (fingers, Commandments, God's attributes, etc.). They bring out a strapped gurney for Casey's protection and theirs. The rabbi and priest explain that the rabbi will be reading the rites in Hebrew and the rest of them will be following the priest in English. The rabbi will use a Jewish horn to bring out the spirit and coax it out of Casey.
Wyndham videotapes the exorcism and they begin. Sendak blows the horn and they start to read the rites. Then the wind starts to blow around the room and Casey sees flashes from her dreams such as her mother and the insects. People in the circle start getting possessed and dying, and she also sees the boy next to her. Mark gets her out of the gurney and they run out of the room, with Casey picking up a page of the rites before she gets out. The boy possesses Wyndham and he chases them. While hiding, Mark is pulled back from the other side of the wall by the possessed Wyndham and the two fight. Mark manages to knock the priest out and Casey and Mark stand against the wall. Casey tells him they have to get out but he keeps sitting and won't let go of Casey. Casey sees that Mark is possessed and runs to the room where her mother died. Mark finds her there and strangles her, pulling her up against the wall and off the ground. Casey uses the necklace that Sofi gave her to stab Mark in the neck and he drops her. Rabbi Sendak comes and continues reading the rites from the book and Casey joins him. Mark is blasted back and down to the first floor, Casey rushes to his side, and he asks her if they stopped the spirit. Casey says she thinks so and he dies.
Again, Casey is on a run on the same trail that she was running at the beginning of the movie, and we hear her asking herself why the spirit decided to become prevalent in her life now. She checks the calendar on her phone, remembers sleeping with Mark, thinks about how she was throwing up in the bathroom of the club, and takes a pregnancy test which turns out to be positive. She goes to the obstetrician and is told that she is having twins. There is a flashback of Matty telling her that Jumby wants to be born now and the movie ends with an ultrasound close-up of the twins in Casey's womb.