Looking back as a 20-something, Adam Turner remembers his high school prom as agony. He was living as a girl back then. He wore a dress. His date groped him. Years after the traumatic event, he recounts the experience to his soul mate, Jenny. He speaks quietly, but his pain manifests with such immediacy that we can almost hear the dance music and see the corsages.

That’s because, in director Susan Marie Rhea’s graceful staging of “Boy” for the Keegan Theatre, Adam and Jenny are played by John Jones and Lida Maria Benson. These two actors have stage presence to spare, and their naturalistic performances and in-sync rapport bring out the heart and urgency in Anna Ziegler’s thoughtfully restrained 2016 play.

Not that the duo are the production’s only assets: An able supporting cast and limber pacing also quicken “Boy,” which is inspired by a true story. Zigzagging in time, from 1968 to 1990, the play recounts how, in the aftermath of a surgical accident, parents Trudy and Doug Turner (Karen Novack and Mike Kozemchak) opt to raise one of their twin boys as a girl. That course of action is prescribed by the well-meaning Dr. Wendell Barnes (Vishwas), who takes a personal interest in the case. Unforeseen consequences await.

The pivotal role of Adam requires the performer to trace the character over two decades, two gender identities, and a spectrum of confusion and decisiveness. Jones, a Catholic University senior who uses the pronoun “they,” pulls off this feat admirably. When they wriggle in a chair, pouting and twisting the long sleeves of their shirt, talking in a wayward childish manner, they establish the reality of a young female-identifying tyke. Grown-up Adam’s hurt, vulnerability and sweetness also come through vividly — maybe as vividly as the illustrations in “Where the Wild Things Are,” a favorite book of Adam’s, and one of several literary texts that get frequent, sometimes too-pointed mention in “Boy.”

Benson is marvelous as Jenny, a spirited single mother often flummoxed by Adam’s behavior. Also commendable is Vishwas, whose sharply drawn Dr. Barnes has real affection for his patient, but not enough to dampen his scientific arrogance and professional ambition. (Science is also a theme in Ziegler’s widely produced “Photograph 51,” which premiered in the Washington area. Starting this week, Theater J is producing another Ziegler work, “The Wanderers.”)

With increased recent attention to issues surrounding gender identity, “Boy” could have registered as too bluntly topical, even with Matthew J. Keenan’s otherworldly cosmic-door-and-amphitheater set gesturing beyond specifics to the script’s key existential question — to what extent can we define our own lives?

Fortunately, the central relationship in the story — between Adam and Jenny — is vibrant and idiosyncratic enough to transcend the zeitgeist.

Boy by Anna Ziegler. Directed by Susan Marie Rhea; lighting designer, Alberto Segarra; sound, Niusha Nawab; projections, Jeremy Bennett; props, Cindy Landrum Jacobs. 90 minutes. Tickets: $41-51. Through March 7 at the Keegan Theatre, 1742 Church St. NW. keegantheatre.com or 202-265-3767