“The Humans” is an uproarious comedy, except for the parts that feel like a horror movie.

A rancid apartment, unexplained noises and objects that move of their own volition are a few of the terror trappings that visit the Blake family during a Thanksgiving dinner that takes place in the new apartment of youngest daughter Brigid (Daisy Eagan) — which, in David Zinn’s stunningly realistic, two-story set, appears to us like a grimy dollhouse with one wall cut off.

There’s a main level but most of the play takes place in the basement. One character compares it to a cave, shortly before another character notes that in dreams, caves and tunnels are where you go to dig up secrets you can’t face while you’re awake.

There are a lot of secrets in the beautifully cast “The Humans” and, although the play’s spookier trappings have a Stephen King vibe, the secrets are everyday ones: Parents Dierdre (Pamela Reed) and Erik (Richard Thomas from TV’s “The Waltons”) may be dosing Erik’s mother (Lauren Klein) too heavily in an effort to calm her dementia, there are money woes and everyone has at least one expensive-to-treat health problem. I will reiterate here that Stephen Karam’s play is hilarious, because I know it doesn’t sound like it would be, especially since it’s also studded with references to the Sept. 11 attacks, Hurricane Sandy, the Triangle Factory Fire and other catastrophes that can turn any day’s first Twitter check-in into a what-fresh-hell-is-this situation.

Like Edward Albee’s masterful “A Delicate Balance” (produced by the Guthrie in 2009), “The Humans” teeters along the precarious line of hope that separates all humans from despair. “A Delicate Balance” never revealed what its privileged characters feared but it’s as if Karam, whose characters have less money and fewer defenses than Albee’s, is determined to specify all of the fears. He also tosses in a supernatural bonus — a metaphor, I think, for other anxieties of the modern world — that lends the play a degree of ooga-booga I’m not sure it needs.

One unexpected, and crucial, element of the play is the Blakes’ affection for each other. Karam’s knowing script makes them feel like actual relatives who have inside jokes and who know how to get under each other’s skin (Brigid kids her sister, Aimee, that her Philadelphia home is safer than New York “only because not even terrorists want to be in Philly.”) It’s clear they get a bang out of each other and they’re trying to conquer their shortcomings to be supportive of each other.

Their warmth and humor actually makes “The Humans” even more frightening because it’s clear how much could be lost. Who needs fake horrors like a zombie apocalypse if, in reality, we may be only a few years away from a resource-deprived, disease-ridden and terrorism-assailed nightmare?