Michael Douglas (as Liberace) and Matt Damon star in Steven Soderbergh’s “Behind the Candelabra.” (Claudette Barius/HBO)

Steven Soderbergh’s HBO movie, “Behind the Candelabra,” is a dramatized account of the latter days and misdirected affections of one Władziu Valentino Liberace, and it’s a sordid and at times beguiling glimpse into one of the world’s blingiest closets and the closet-case who occupied it.

But it is mostly only sordid, and strangely devoid of the thematic layers that often accompanied the director’s recent work. A year ago, Soderbergh delivered the surprisingly thoughtful “Magic Mike” to theaters, a film about a group of male strippers in Tampa. “Magic Mike” extracted achingly and subtly spot-on performances from Matthew McConaughey and Channing Tatum while it humanized a tacky and darkly troubled milieu, bathing its characters harsh but beatific Floridian daylight.

The same cannot be said for “Behind the Candelabra” (airing Sunday night), which consistently holds its subject, Liberace, out at arm’s length with tongs. The main message of the film is . . . disgust? Pity?

Perhaps vamping is the only real purpose here. In that regard, “Behind the Candelabra” is a costuming and cosmetic half-success, somewhere between freak show and amateur drag night. Michael Douglas stars as the famed pianist, dolled up and bedazzled, lisping his way through what turns out to be only a vague approximation of the older, 1970s/’80s-era Liberace — “Lee” to his inner circle — that most of us remember from variety shows. This is the faded celebrity in his semi-retiring Vegas years, surrounded by garish furnishings and yippy-yappy dogs that defecate on marble floors. Atmospherics are “Behind the Candelabra’s” strongest suit, re-creating a gauzy and unctuous realm of expensive cheapness.

Though Lee is an enthusiastic participant in the back rooms of the sexual revolution, its broader freedoms have entirely passed him by; when Douglas’s Liberace takes the stage, everyone except his geriatric fan club has caught on to the entirely unsurprising notion that Liberace is homosexual.

After premiering at the Cannes Film Festival, “Behind the Candelabra” will air not in theaters, but on HBO. Michael Douglas stars as Liberace. (Claudette Barius/HBO)

As a measuring stick of social progress, “Behind the Candelabra” at times comes off like those films about the tribulations of black Americans in the Jim Crow era; you simply cannot get your mind around the construct of fear and secrecy that defined gay men. The Liberace we see is obsessed (to the point of litigation) with maintaining the fiction of his heterosexuality, insisting to his grave that he only ever pined for the figure skater Sonja Henie. For all his flamboyance, Liberace perceived open gayness as a humiliating career-killer (as many celebrities still do).

Yet it seems “Behind the Candelabra” has little interest in unpacking the ironies and self-loathing that haunted Liberace and those around him. With some subtle adjustments to Richard Lagravenese’s screenplay, the movie could very well act as a metaphor for a story about the beginning of the end of gay discrimination. Instead, “Behind the Candelabra” is one long downward spiral, a gratuitous tale of a man who drowns in his own opulent acts of denial.

Lagravenese’s efficient but weirdly two-dimensional screenplay is based on a tell-all book of the same name by Scott Thorson, who was Liberace’s live-in lover and, nominally, his chauffeur and houseboy. Released a year after Liberace died in 1987, Thorson’s “Behind the Candelabra” was greeted mainly as an act of salacious revenge penned in the wake of a bitter legal dispute. In hindsight, Thorson’s book was a stab at truth — even if it was an opportunistic stab at truth.

So much time has gone by that the film version can mainly get by with reveling in the retro of it all, occupying the same chronological and psychic space as “Boogie Nights.” In the movie, Matt Damon, who is 42, plays Thorson from the age of 18 to 29, a glaring fact of miscasting. (Douglas, at 68, is playing Liberace from age 56 to 67, and “stretch” isn’t quite the right word for what the performance lacks.) The screenplay gives Damon a whole lot more to work with, in terms of both depth and deception, and, to his credit, Damon outperforms Douglas early on. The Scott Thorson shown here is a fair-haired naif in the presence of a cunning and fruity Dracula; no sooner does Scott go with a friend to Las Vegas to see Liberace’s concert than he is in the palatial hot-tub getting the hard sell from Mr. Showmanship himself.

Ignoring his foster parents’ cautionary advice and the sneering, foreshadowing doom of one of Liberace’s discarded houseboys, Scott moves to Vegas and becomes Lee’s full-time employee and, as he discovers on his first night, sexual companion. (Further nightmares await when Scott discovers that Liberace wears a toupee.) Scott identifies as bisexual, which is not unlike Lee’s public perpetuation of the myth of confirmed bachelorhood. As the years roll by, the two men settle into something like a marital arrangement with mutual affection — mostly courtesy of the pills Scott starts popping. Liberace then legally adopts Scott, which is less of a dad-son fetish and more of a notarized form of servitude.

I’m conflicted. There is some entertainment value in seeing this story splayed in all its glittery — and truthy — discomfort, even if it means the viewer spends two hours watching the manifestation of some of the very worst gay stereotypes. Rob Lowe arrives as Jack Startz, a garishly fey plastic surgeon who is summoned to give Lee a rejuvenating facelift and to remake Scott’s face into a dimpled-chin, Liberace-esque ideal. Lowe’s performance is slithery and over-the-top and it made me realize the thing “Behind the Candelabra” needs most: a gay sensibility and probably a gayer cast. Start with Nathan Lane or David Hyde Pierce; call Neil Patrick Harris; audition Lance Bass for one of the bit parts; ask Andrew Rannells if he’s game. This list is long in 2013.

On a related, campy note, guess who is the only person in this movie who absolutely nails it? That would be Debbie Reynolds, as Liberace’s guilt-tripping mother. In just two short scenes, her delicious presence tends to prove my point: If you’re going to make another “Mommie Dearest,” then go all out and make another “Mommie Dearest.” Because what you see here, mainly, are some good straight male actors grasping at a trite and incorrect tone in the middle of a mediocre Lifetime movie.

It just gets sadder and more depraved for Lee and Scott. The older man becomes clingy and controlling; the younger man suffocates. Lee suggests an open relationship, but neither man approves of the other’s interpretation of extramarital activities. When Lee compares their lives to an old sitcom, Scott protests: “Why am I the Lucy?”

“Because I’m the bandleader with the nightclub act,” Liberace hisses. By now Douglas’s performance has lapsed into a rhinestone-covered Gordon Gekko. Damon, meanwhile, gets better as he goes — mainly because our sympathies are squarely in Scott’s corner. Scott becomes a cokehead, Lee kicks him out; those of you who read the gossip pages in the 1980s know the rest of it. There are lawsuits and accusations and payoffs.

Then Lee dies — of heart failure, his pitbull attorney (Dan Aykroyd) insists to the press, until the Riverside County coroner feels duty-bound to extract tissue from Liberace’s embalmed body in order to prove, once and for all, that Liberace was . . . well, what everyone already assumed he was, and that he died of AIDS-related pneumonia. And that’s where we leave it, with Scott sitting at Lee’s funeral, imagining the beloved, delusional virtuoso floating away on glittery cape-wings.

At a news conference earlier this year for “Behind the Candelabra,” Soderbergh and company expressed their gratitude to HBO for picking up the film when major studios balked at funding it, reportedly because the gay content was too much to handle. I’m not entirely convinced that “Behind the Candelabra” didn’t make it to theaters for that reason alone. I think it’s because the story as told is just too depressing, too empty and, most of all, too dead and gone.

Behind the Candelabra

(two hours) airs Sunday at 9 p.m. on HBO,
with encores.