On paper, the plot synopsis of Lars and the Real Girl sounds utterly unappetizing: “Sweet boy falls for inflatable sex toy.” In fact, the result is emotionally richer and more tasteful than one could imagine, given the tawdriness of the concept. It’s an impressive triumph over yechhh.

Lars Lindstrom (Ryan Gosling), a cubicle jockey in a small Midwestern town, is almost too sweet and shy. He lives in the garage behind the family house, which has been taken over by big brother Gus (Paul Schneider), together with his wife Karin (Emily Mortimer), who is very pregnant. Lars is increasingly avoiding contact with the couple, basically shuttling between his makeshift domicile and his unfulfilling job.

Practically everyone seems to be worried about Lars’s isolation — in particular, his lack of a relationship. Despite his social oddness, he seems to be regarded as a good “catch,” and adorable coworker Margo (Kelli Garner) is practically throwing herself at him. Yet Lars backs off from all advances.

Then one day — the very same day he’s receives a huge crate — Lars excitedly tells Gus and Karin that he’s got a girl visiting him from Brazil, someone he met on the Internet. But she’s very prim, so could she sleep in their spare room?

The Lindstroms are overjoyed until Lars introduces them to Bianca, who turns out to be a well-crafted, but hardly talkative, hunk of latex. As Lars responds to Bianca’s otherwise unheard vocalizations, Gus suddenly realizes that his brother is full-on Tony Perkins, Son-of-Sam insane.

Because Lars claims Bianca to be an invalid — which explains why she has be carried from place to place — Gus and Karin convince him that they should all pay a visit to Dagmar (Patricia Clarkson), the local GP, who is fortuitously also a psychologist. Dagmar contrives some kind of imaginary in-office treatment for Bianca, so that she and Lars have some chatting time each week.

Dagmar suggests that the Lindstroms simply accept Bianca on Lars’s terms for the duration. Besides: he’ll simply block out any attempt to confront him with reality (as Gus quickly learns).

As word spreads, the entire community joins in. Ironically, Lars’s social life starts to grow more normal, now that he’s been validated by having a lovely girlfriend.

Director Craig Gillespie and writer Nancy Oliver have reduced the ick factor by desexualizing the setup; Bianca may be anatomically correct, but she and Lars have a chaste relationship — certainly a relief for Gus and Karin, who bathe and dress her. (Try not to think about it.)

The most obvious classic forebear here is Mary Chase’s play Harvey and its various film and TV versions. But Gillespie’s film takes place in what is otherwise a more naturalistic universe, so the dissonance between the sweet tone and the genuine mental distress that has given rise to Lars’ delusion seems greater. Indeed, some might find the whole affair nauseatingly cutesie-poo.

But I think there’s a worthwhile complex of themes lurking underneath — the same themes that made Robert Zemeckis’s Cast Away (2000) so terrific. Once everyone in town starts acting as though Bianca is real, does it make any difference that she’s latex? Not only can we never be completely certain that other people are “real” — as opposed to automata constructed to amuse us — but to what extent do we relate to some genuine sense of others rather than a series of perceptions and prejudices we project onto them?

If I’m getting a little murky in my deepdish ruminations, let me just ask this: How many of you wept in Cast Away when Wilson was swept out to sea? How many wanted Tom Hanks to risk his life trying to rescue him?

I thought so.

The emotions the audience attaches to Bianca aren’t as strong, I think, as with Wilson, in part because she looks almost human, which constantly reminds us that she’s not.

For better or worse, Lars and the Real Girl hints at the sources of Lars’s delusion/illness without ever indulging in a big, dramatic “breakthrough” scene. And Gosling does a remarkable job of keeping the character sympathetic, even when we’re clearly being shut out of his inner life.

There is one serious obstacle to buying into the world of Lars: You have to accept the existence of a small town without a single nasty hooligan or spiteful bully. The villagers are remarkably broadminded and supportive: Quite frankly, the notion of a talking, living latex doll strains my credulity less than the idea of a small, Midwestern town filled with nothing but benevolent souls. n

Currently playing at Regency Paseo Camarillo Cinemas and Mann Westlake Village 8.