‘Hope Springs,’’ a funny and perceptive comedy-drama starring a very fine Meryl Streep and Tommy Lee Jones as a long-married couple trying to revive their dormant sex life, achieves a significant cinematic landmark.

It’s the first movie I’ve seen in which Viagra isn’t just a joke.

Jones’ Omaha accountant, Arnold, has been dragged by his sexually frustrated wife, Kay (Streep), to Maine for a week of intensive counseling sessions.

These are conducted by a psychiatrist named Dr. Feld (a winningly low-key Steve Carell), whose polite but insistent questioning determines that erectile dysfunction is an obstacle to the couple’s intimacy.

So there will be no quick fix.

According to Kay, her husband hasn’t even touched her since he moved into the spare bedroom five years ago because of a back injury. He’s long since healed, and devotes his evenings primarily to watching golf videos until he falls asleep. But her emotional scars are still raw.

Though things stay on the side of PG-13- rated good taste (except for an unfortunate movie-theater sex scene that belongs in another film), this is relatively unusual subject matter for an American movie, especially a mainstream one.

As wonderful as Streep is, it’s Jones — with whom she has great chemistry — who owns “Hope Springs” as the magnificently grumpy Arnold, complaining that the money Kay’s blown for this retreat would be better spent on a hot-water heater.

People in this age group are typically portrayed as either Walmart-loving boobs or stock figures in real-estate porn com-edies like “It’s Complicated.’’

Instead, screenwriter Vanessa Taylor (HBO’s “Tell Me You Love Me”) and director David Frankel (“The Devil Wears Prada”) offer a rare, dead-on portrait of middle-class middle Americans, despite a few missteps — the on-the-nose, pop-oriented score and a passing reference to a fantasy about a threesome that’s prominently featured in the trailer.

Costumes are credited to the legendary Ann Roth, but Kay’s clothes could have come straight off the rack at Coldwater Creek, the mall chain where the character works.

Streep does a beautiful job conveying Kay’s quiet desperation at the spouse she still loves, and Carell demonstrates his acting chops in a basically straight role with a little bit of humor.

It’s Jones who does the heavy lifting. He is great at sketching out the oblivious Arnold’s difficult journey to acknowledging his wife’s pain.

His fumbling, sometimes humorous and ultimately touching efforts to change and reach out to her finally include dinner and a night at a local inn that’s far more conducive to romance than the EconoLodge where they’ve been staying.

“Hope Springs’’ could have been unbearably schmaltzy or crude. Instead, in the hands of these expert actors and filmmakers, it’s a warm and wryly affecting mid-summer treat.