Based on the true story of Michael Glatze, a gay activist who rejected his homosexuality to become a controversial Christian pastor, “I Am Michael,” is an intermittently affecting — but not entirely convincing — conversion story.

We first meet Michael (James Franco) as a pastor, telling a young gay man that his sexuality is a “false identity,” before flashing back to Michael’s life in the late 1990s, when he lived in San Francisco with his boyfriend (Zachary Quinto) and published an LGBT magazine. The brutal 1998 murder of Matthew Shepard inspires Michael to speak out, yet his declaration — “Being attracted to the same sex doesn’t define who you are” — is delivered with all the earnestness of a public service announcement.

The screenplay by director Justin Kelly is a bit on the nose. At first, Michael disparages the Christianity he will later embrace. The scales fall from his eyes while making a documentary about gay youth, as Michael silently observes a student who has recently come out, yet remains Christian. You can almost hear him thinking, “Maybe I was wrong.”

Executive-produced by filmmaker Gus Van Sant — whose own work handles gay characters with sensitivity — “Michael” addresses the theme of identity clumsily, although it avoids treating the title character as a villain. Predictably, as Michael’s crisis reaches a climax, he is shown facing his reflection in a mirror.

Michael’s turn to God seems sincere, even if his sexuality is not easily denied. “I Am Michael” respects the faith of its protagonist, but its flaws may nevertheless turn off audiences — regardless of religion or orientation.

Unrated. At AMC Loews Rio Cinemas 18; also available on demand. Contains strong language and sexual material. 100 minutes.