Passionata, the new play by Gwyn McAllister, is a sparkling period comedy that dances nimbly on the edge of farce. Running through July 14 at the Martha’s Vineyard Playhouse, Passionata takes aim—with a decidedly 21st-century eye—at age-old conventions of marriage, property and heredity, while never giving up on the potential of true love.

Ms. McAllister spins a beguiling web of complications for her well-drawn, appealing characters, and for the audience. The play begins with an engagement and ends with another happy event, but neither is what it seems. Nor is the gardener—or the other gardener.

In fact, we learn everyone in this play has something to hide. Fiona and Tom have agreed to wed because they can’t marry the people they truly love. Edward is a very bad imitation of a gardener. Strong-willed Katherine insists on a wealthy match for her daughter Fiona, concealing the memory of her own youthful passion. Even the roses have a secret.

Abigail Rose Solomon is Katherine; Molly Densmore is Fiona. — MJ Bruder Munafo

Taking place in the garden courtyard of an English country house in 1909 and 1910, Passionata briskly introduces a thoroughly modern love triangle: heiress Fiona, her well-to-do friend and fiancé Tom, and his beloved Edward, another gentleman of leisure who is desperately trying to pass as an estate gardener in preparation to join the couple’s household when they wed.

This plan is the brainchild of Fiona, a determined young woman stopped by her mother from marrying the penniless Rory. A match with Tom won’t salve her heart, but at least she’ll see him and Edward happily united.

Naturally, complications rapidly arise. Tom’s parents want an heir, for one thing. And then there are Fiona’s parents, Edward’s sister and (because the roses are suffering) another gardener to give poor Edward a hand.

Always eager to maintain her precedence, Katherine beats out her neighbors to be first in hosting a visiting missionary, who turns out to be Edward’s humorless sister Clarice (arriving in the garden, she disdains “flowers and their unnecessary garishness”). Will she betray him to their parents, who also are hungering for an heir? They won’t get one from her; she’s vowed to chastity.

Then comes Antonio, a true gardener whose years in England haven’t diluted his native Italian accent. This time it’s Katherine who’s surprised, and a little flustered, to meet the man who had worked on her parents’ estate when they were both young. What passed between them must never be known, she warns, but Antonio can’t resist luring her with double entendres. “I have many secrets to bring vigor back to sad, wilted flowers,” he says.

The best comedies contain a trace of wistfulness, and Ms. McAllister achieves this beautifully with a touching scene between Katherine and her husband Harold, who for much of the play comes off as a kind but stiff and bumbling family figurehead. David P.B. Stephens, whose well-modulated performance is one of the show’s many highlights, is affectingly believable in the moment when Harold finally protests his wife’s obstinance in blocking Fiona and Rory.

David PB Stephens plays Harold – shown here with Molly Densmore and Abigail Solomon. — MJ Bruder Munafo

“It broke my heart to see my daughter’s heart break,” Harold says. “Is love a matter of bargaining for you?”

But he soon subsides: “I am ridiculous at times, I know. I’ve said enough.”

How Ms. McAllister achieves optimistic endings for her lovelorn characters is a marvel of comic plotting and timing, abetted by engaging performances.

Playhouse artistic director MJ Bruder Munafo directs the strong cast, which in addition to Mr. Stephens includes Molly Densmore as Fiona, Michael Jennings Mahoney as Tom, Matt Greenberg as Edward, Abigail Rose Solomon as Katherine, Finty Kelly as Clarice and Paul Munafo as a convincingly Italian Antonio.

Ms. Bruder Munafo and Ms. McAllister also use music to buoy the action, with orchestral cues from Percy Grainger and Frederick Delius.

Lisa Pegnato’s set design is rich in colorful flowers and scenic painting by both Ms. Pegnato and Island painter Basia Jaworska Silva. Cynthia Bermudes designed the Edwardian costumes. Lighting is by Ernest W. Iannacone.

After it closes at the playhouse July 14, Passionata faces an uncertain future. “I’m not very good at promoting myself,” Ms. McAllister said at the reception following last week’s opening night.

But Ms. Bruder Munafo believes this is just the beginning.

“I really think Passionata could have a life beyond the playhouse,” she said. “It’s got great roles, it’s lots of fun and it’s contemporary—and it’s old fashioned.”

For show times and tickets, visit mvplayhouse.org.