After fashioning one 1950s-set masterpiece with “Far from Heaven,” Todd Haynes returns to the decade and scores another with this exquisite adaptation of Patricia Highsmith’s semi-autobiographical “The Price of Salt,” a lesbian novel (whose publication in 1952 under the pseudonym of Claire Morgan pointed up the temper of the era) which broke the mold at the time because of its relatively happy—or at least not tragic—ending.

As adapted with subtlety and intelligence by Phyllis Nagy, “Carol” is actually quite a simple story of the attraction between two very different women at a moment in American history when such relationships could have devastating consequences. In 1950 Therese Belivet (Rooney Mara), an aspiring photographer, is working as a clerk in the toy department of a Manhattan department store during the Christmas rush. The timid young lady has a boyfriend, Richard (Jake Lacy), a pleasant fellow who’s pestering her to go to Europe with him while he’s studying there and wants to marry her, but Therese is clearly uncomfortable with such a possibility. Nor does an encounter with another nice guy, Dannie (John Magaro), a newspaperman who encourages her photographic ambitions, seem to be going much beyond friendship.

What jars Therese to emotional life is a chance meeting with Carol Aird (Cate Blanchett) is an elegant, well-to-do woman who stops by her aisle in the store to buy a present for her daughter Rindy (Kennedy and Sadie Heim). A connection between the two seems immediate, though there’s no overt sign of anything beyond a purely businesslike conversation about dolls and toy railroads. When Carol departs, however, she leaves behind her gloves on the counter, prompting Therese to get in touch with her to return them. A thank-you lunch follows, after which Carol invites Therese to visit her in her New Jersey home, and their friendship quickly blooms.

That’s a signal to Carol’s estranged husband Harge (Kyle Chandler), who’s separated from her as a result of her long-time relationship with Abby (Sarah Paulson) and is roughly demanding that she return to a wifely role. When she declines to accompany him and Rindy to his parents for the holidays, he storms off in a drunken huff. Carol, in return, suggests that Therese join her on a road trip to the Midwest, during which they finally give in to their desire for one another. Doing so proves, however, to have dire consequences insofar as Carol’s ability to have any contact with her daughter is concerned. She’s forced to make a choice between Rindy and Therese, a decision that threatens to keep the women apart for good.

As with “Far From Heaven,” Haynes treats a Truman (and early Eisenhower)-era tale of a love that’s deemed unacceptable by an uncomprehending society with supreme sensitivity and poise. Within a perfectly recreated period ambience fashioned by production designer Judy Becker, art director Jesse Rosenthal, set decorator Heather Loeffler and costume designer Sandy Powell, he, cinematographer Ed Lachman and editor Affonso Goncalves use a mixture of intense close-ups, cannily chosen distant shots, shadows, muted yet creamy colors and sensuously deliberate pacing to suggest the passion that’s churning beneath apparently placid surfaces. Carter Burwell’s moody score similarly exudes the feeling of deep longing stymied by supposed propriety.

Without superb acting, however, all the craftsmanship behind the camera would count for little. The supporting cast is excellent, with Chandler and Paulson the standouts: he captures the vanity-based anger of a man incapable of comprehending his wife’s needs, and she the self-sacrifice that leads Abby to assist Carol and Therese when they need her even though her the former has moved on. But the film belongs to Blanchett and Mara. In a role that makes very different demands from the one for which she won the Oscar in “Blue Jasmine,” Blanchett is generally the embodiment of understated refinement. But she can also convey Carol’s uncontrolled fury when she feels betrayed, and her devastation over the thought of losing her child, and her stern determination when she takes a final stand against the irrational prejudice her husband represents. Mara has a less demonstrative, but perhaps more difficult part to play, evolving slowly from mousiness to the excitement of discovery and finally to a sense of self-confidence that has eliminated her earlier dependence. It’s the film’s skill in portraying the two women’s emotional arcs with such precision that makes its final moment so radiant, achieving an effect not unlike the one Hitchcock managed in the first vision Scottie has of Madeleine in “Vertigo.”

“Carol” is a small film, but it’s like a flawless gem with endless facets to explore and appreciate. There may be some complaints from Highsmith devotees that it softens the book in some respects, but the changes aren’t detrimental to its essence, which shows both how much things have changed since 1952 in terms of the law and, paradoxically, how much they might not have in the wider society.