At first glance, the subject ofThe Sessions —a severely disabled, 38-year-old polio victim who longs to have a sexual relationship — may drive people away from movie theaters.

But the movie, based on the autobiographical writings of poet and journalist Mark O’Brien, is a surprisingly funny and affecting account of his late-life desire to have a sex life, just as non-disabled people can have.

In the 1980s, O’Brien, played on a gurney and in an iron lung by John Hawkes, is a bright, funny, observant writer living, as independently as he can, in Berkeley, Calif. He types his articles via a stick in his mouth.

O’Brien explains that he once moved independently, driving his gurney himself through the campus of the University of California at Berkeley, the school he graduated from in 1982 with a bachelor’s degree in English.

Subsequently banned from maneuvering the gurney himself because of his multiple collisions, he relies upon a part-time caregiver, a young lady he refers to as his assistant, to push him when he leaves his small apartment.

Written and directed by Ben Lewin, a polio victim himself, The Sessions’ main point of departure is an assignment O’Brien gets to write about the sex lives of the disabled. He’s astonished by the people he interviews.

“Who are these people?” he asks. “I feel like an anthropologist interviewing a tribe of headhunters.”

The women O’Brien usually deals with are his gurney-pushing assistants. When the assistant happens to be young and attractive, such as Amanda (Annika Marks), the second of the film’s three caregivers, O’Brien, as any man with normal desires would, finds himself drawn to her.

“I love you,” the writer tells Amanda from his gurney during a shopping trip.

Odds are that O’Brien’s flare-up of romantic love for Amanda won’t be requited. When it isn’t, he suffers heartbreak as intensely as any adolescent boy enduring his first crush.

The crush, even more so than the article O’Brien writes about sex and the disabled, inspires him to consider whether or not he can experience love and sex during his disabled lifetime.

A devout but inquisitive Catholic, the writer talks frequently with his parish priest. The deadpan William H. Macy plays fictionalized composite character Father Brendan. O’Brien’s consultations with the priest and questions pose vexing, albeit amusing, moral challenges for Father Brendan.

Helen Hunt co-stars as Cheryl Cohen-Greene, the sex surrogate the writer engages to, if all goes well, be his first sexual partner. Cheryl sees herself as a sex therapist. Hunt plays Cheryl as a complete, but not unfriendly or uncaring, professional.

Hawkes, an actor who’s appeared in such recent films as Lincoln, Winter’s Bone, Contagion and Martha Marcy May Marlene, disappears into his role as the self-effacing, witty, gurney-bound O’Brien.

True to the movie’s storyline and O’Brien’s quest to experience sex for the first time, there’s much nudity. The scenes, as performed by Hawkes and Hunt, achieve a life beyond sex, something magical, even spiritual.

The 49-year-old Hunt plays the sex scenes beautifully. Most of the physical responsibility, after all, is on her character’s shoulders. But the bond that develops between the two characters is the work of both Hawkes and Hunt.

O’Brien’s life story and extreme disability yields unexpected beauty and poignancy. The Sessions is quietly stunning.