The film opens at a rural home as two people scramble outside pursued by two armed men. One of the fleeing is shot and wounded while the other frantically runs off into the night. The two men - one older, the other younger, approach the wounded woman and one hands a canister of gasoline to the other. After the woman is doused, one of the men drops a lit cigarette on her - burning her to death - as they get in their car to presumably pursue their other victim. In the distance, a figure watches the grisly scene, dressed from head to toe in a white robe with only a black triangle at the center of the face-mask.
Elsewhere, police officer Daniel Carter sits in his squad car on a country road. After checking in with dispatch, Daniel spots someone crawl out of the treeline on their hands and knees. Daniel approaches, thinking it to be an intoxicated teenager but hurriedly whisks him away in the backseat of his car when he sees that the man is delirious and covered in blood. Daniel contacts dispatch and asks which hospital is closest to his current location. The dispatcher tells him that the closest one may not be prepared to deal with the situation as they're in the process of closing down after a fire ravaged an entire section of the building. With the next closest hospital still twenty minutes away and unsure of the extent of the man's injuries, Daniel reluctantly speeds towards his only option.
When Daniel brings the man through the front door the nurse at the front desk scrambles for help and calls Dr. Richard Powell and another nurse (Beverly) who takes the man away to be examined. Daniel takes a moment during the silence to say hello to teenage Maggie and her grandfather Ben who have come in that night for a check up on Maggie's far-along pregnancy.
After the doctor discovers heroin needle marks on the man's arms Daniel realizes he has the junkie's blood on his uniform and goes to clean it off - being brought a cup of coffee by the nurse at the front desk who is revealed to be Allison - Daniel's estranged wife. When Allison leaves, Dr. Powell approaches him and tells Daniel to take it easy on Allison and that he understands all too well what it's like to lose a child.
In another part of the hospital, nursing intern Kim sits in the room of patient Cliff annoying him with her boredom and frustration at having been assigned to a hospital that's understaffed and in the process of moving out. When Cliff tells Kim he's going to sleep she leaves the room.
Shortly thereafter as Daniel roams the halls of the hospital he sees Beverly standing over Cliff and something doesn't seem right. As he approaches closer he sees that Beverly has shoved a pair of scissors into the boy's skull through his eye which she slowly pulls back out. Daniel draws his sidearm and confronts Beverly who slowly turns around to reveal that she has nearly removed her entire face. As Daniel demands that Beverly put the scissors down she begins to further slice away at the remaining skin and tells him that it's not her real face. When Beverly begins to approach him, Daniel shoots and kills her. As Allison, Kim, and Dr. Powell rush to investigate, an overwhelmed Daniel stumbles into the nearest bathroom, throws up, and then passes out.
While unconscious, Daniel has visions of a dark and desolate landscape with swirling clouds above, a sinister looking nebula somewhere in space, and a black triangular mass.
When he comes to, Daniel is fervent about calling in the incident despite Allison and Dr. Powell's pleas for him to take it easy. They also inform him that while he was passed out a state trooper had arrived at the hospital. Daniel finds the trooper (Mitchell) and asks him how he arrived so quickly. Mitchell explains to him that he's investigating a mass murder that happened at a house not far away and he's there for the man that Daniel had brought in earlier that night. Aware of what happened with Beverly, Mitchell then berates Daniel for the situation he can't seem to get control of and even insults Daniel by referencing how great of a police officer his father was and suggests that he would've handled things better.
Daniel, still insistent about calling in the incident with Beverly to dispatch leaves the hospital for his car parked just outside. When he's unable to reach anyone Daniel notices a figure wearing all white except a black triangle over the face. When he tries to speak to and approach the figure a loud foghorn is heard in the distance and a lights of the hospital flicker. The mysterious man attacks Daniel and manages to puncture his chest with a knife before being tossed off.
Daniel flees back into the hospital and once again passes out - having similar visions as before - as Allison, Kim, and Dr. Powell see to his bleeding wound. Shortly after Daniel awakens a scream is heard from the junkie's room and Mitchell and Daniel rush to investigate. Inside a grotesque, twisted, and tentacled Beverly attempts to attack the junkie before the two police officers manage to rescue him and lock the creature inside.
Frightened by the creature and seeing that the hospital has become surrounded by figures dressed like the one whom attacked Daniel, the group panics. Suddenly the two men from the start of the film burst into the hospital and at gun-point demand that junkie be handed over to them. As Daniel and Mitchell try and de-escalate the situation, the junkie grabs Maggie and holds a scalpel to her throat. As the tension rises, Dr. Powell slowly approaches the junkie and tries to get him to release Maggie but is stabbed in the neck as falls to the floor - dead.
The Beverly creature suddenly emerges through another doorway and takes Mitchell away. Taking advantage of the confusion, Ben knocks the junkie unconscious and saves Maggie. Daniel follows after the creature with a fire-axe and turns a corner to see it holding a barely alive Mitchell, forcing its tentacles down his throat and into his eye sockets. The two strange men appear and begin attacking the creature - killing it and chopping off Mitchell's head in the process.
Unsure of what may happen, the group takes Mitchell's body, strap it to a gurney, and set it on fire before rolling it outside into the parking lot. As the group tries to make sense of what's happening, Daniel manages to come to an uneasy alliance with the two strange men (the older named Vincent, the younger Simon) - one of which, Simon, we learn cannot speak due to an injury. Just at this moment, Maggie begins to experience pain and fearing her and her baby's life Allison insists on going to the medicine storage room to gather things to help the teenager. Daniel formulates a plan to retrieve his shotgun and ammunition from his squad car with Vincent and Simon and tells Allison to wait until he returns before going deeper into the hospital.
Daniel and the two others head outside to find that the car has been rolled further away from the entrance but there are no mysterious figures to be seen anywhere. They run to the car and while Vincent keeps a look-out Simon opens the trunk and retrieves ammo and flares while Daniel struggles to unlock the holster for his shotgun. When Vincent notices a figure in the distance, Daniel switches on a his lights to reveal the tree-line where many of these figures stand silently, brandishing knives. When one suddenly appears behind Simon and prepares to attack him, Daniel releases the shotgun and kills the assailant before all three of them sprint back to the hospital.
When they return, they find that Allison has chosen not to wait and has ventured out to the medicine storage room against Daniel's wishes for her to not go alone. As Allison gathers up what she needs someone appearing to be Dr. Powell stands behind her. Back at the entrance, Daniel notices that Dr. Powell's body is missing as he and the two men make their way to the storage room to find Allison. While looking for her, and finding nothing but the bag within which she was collecting what she needed, the three come across Dr. Powell's office and investigate. As Vincent looks through a tin box filled with Polaroids of naked women, the mysterious figures, and dead bodies Dr. Powell speaks to Daniel on the phone - taunting him before hanging up.
Wanting answers, Daniel allows Vincent and Simon to interrogate the junkie - threatening to break his fingers with a hammer if he doesn't tell them what's going on.
The junkie claims to not know anything about what appears to be a cult but reveals that he was lured to the house with the promise of crystal meth and joined other drug addicts there. Things quickly took a turn for the worst as the cultists (including Dr. Powell) watched the junkies have sex before sacrificing them in strange rituals and performing experiments on both alive and dead victims. The junkie is only alive because Vincent and Simon showed up that night, guns blazing, and killing everything - cultist or not - in the process. It's then revealed that Vincent and Simon, who are father and son, went to the house to get revenge on those responsible for killing their family.
Desperate to find Allison, Daniel convinces Vincent and Simon to come with him into the burned out section of the hospital, believing that that's where Dr. Powell has taken her. He leaves Kim with Ben and Maggie despite her protests and gives Ben a gun to help protect them. The three men then bring the reluctant junkie along whom they don't entirely believe to be innocent in all this.
As they travel deeper into the destroyed section of the hospital Kim, who's been helping them navigate over the radio, loses track of where they are and eventually comes to the realization that they've managed to enter a part of the building that shouldn't technically exist. As Kim loses radio contact with Daniel, the four men enter a maze-like area with a giant triangle and other symbols etched into the floor.
Meanwhile someplace else, Allison awakens on an operating table as Dr. Powell stands over a sink washing bloodied surgical tools and picking away at pieces of his own flesh. Powell explains that after the death of his daughter he went searching for answers on how to transcend death and transform himself into something greater, but also to discover a way in which he could bring his daughter back. After encountering something that showed him how he began a cult to help him achieve this and has been conducting experiments on the living and the dead for years - referencing the hospital's fire as being started by of some of his unsuccessful creations which he's kept around despite their desire to die. Powell, who has begun flaying the skin off of himself, then removes the sheet covering Allison whose stomach has become engorged with something moving around violently inside her.
Daniel, Vincent, and Simon continue their search and come upon a room filled with mutilated corpses who've been experimented on in various states of decay. When Vincent begins to have visions of his dead wife the corpses come to life and begin attacking them. After briefly fighting them off, Vincent sees his wife holding their baby run through a doorway and chases after them with Simon close behind. Daniel and the junkie flee in a different direction but a creature grabs the junkie and bashes his head repeatedly into the floor - killing him and allowing Daniel to escape.
Back up in the hospital Maggie begins to experience severe pain again and Kim comes to the realization that she needs to perform a C-Section on her lest they both die. Kim tries to make the first incision but panics and tells Ben she can't do it. As Ben pleads for Kim to do the surgery, Maggie slits his throat - revealing that not only is she a part of the cult but she's carrying Dr. Powell's new child. As cultists begin to invade the hospital, Kim hides herself in a cabinet.
Simon follows his father through the tunnels which inexplicably begin to turn into their home. He finds his father grieving over his dead wife and infant child and then turns to attack Simon, asking over and over why he didn't protect them. The illusion disappears and Vincent recollects himself.
Daniel eventually comes across the room where Allison is being kept and finds her alone still laying on the operating table - pregnant. He caresses her stomach and kisses her as she tells him to stay with her. Suddenly this illusion disappears and Daniel finds himself standing over an Allison whose stomach has exploded outward with tentacles. An unseen Dr. Powell tells him that he was able to give her what she always wanted: to be a mother. Daniel then takes his axe and continuously chops away at Allison's remains.
Making his way into a large room with an illuminated triangle on the wall, Daniel is lectured by Dr. Powell about his experiments and his knowledge of life and death. He offers Daniel to be allowed to join his cult and tells him he can bring his child back too if he's willing to die first. When he refuses, Maggie appears and shoves a knife into his back. As Daniel collapses a skinless, inhuman Dr. Powell reveals and explains that he found a way to bring his own daughter back. Powell asks Maggie if she's ready and then kneels in front of the triangle. Reciting an incantation the triangle opens - revealing a blindly bright void of light.
As Maggie convulses and screams in horror a large, twisted creature which Powell calls his daughter emerges from her torso. Vincent and Simon appear and the creature chases after them. Eventually, Vincent is caught and as it begins to force its tentacles into his body he covers himself and the monster in flammable liquid and calls for Simon to set them ablaze with a flare. After some hesitation, Simon does and flees.
Still alive, Daniel crawls to Powell who grabs him by the throat as he tries to resist. Powell attempts to once again convince Daniel to join him and promises he can be with Allison again. Daniel then grabs hold of Powell's arm and forces them both through the void of light and they disappear.
As the place begins to rumble and collapse, Simon continues to flee the now-charred creature. As a hallway he's running through begins to close in around them, Simon barely escapes as the monster gets crushed and he somehow finds himself back at the hospital's entrance. Finding Kim still in the cabinet, the two exit the hospital as dawn begins.
The film ends in the desolate and dark landscape that Daniel had towards the start of the film. He stands there, holding hands with Allison, as the two gaze upwards at a massive floating black pyramid...