Mountaineering becomes a metaphor for masculinity in Elinor Cook's layered and lyrical three-hander. Will and Dan, old friends from Wales, are climbing a peak that's never been scaled, pitting themselves against the world and pushing themselves to prove themselves. Back home, exploring unchartered territory of her own with a PhD in folk stories, is Rachel, the woman they both love.

Pilgrims isn't just a protest about the way women get sidelined in stories – that men get to be heroes, and women, their prizes – it dares to suggest there's a reason for that. Cook unpicks the underlying psychology: the masculine impulse to leave one's mark combined with the stubbornness to steamroll one's will.

We know the climb is doomed from the off. Jumping back and forth in time, Pilgrims opens with Will (Steffan Donnelly) lying flat on his backpack, breathing heavily through pain as Dan (Jack Monaghan) tries to keep him awake. Flashbacks unfurl their friendship, and their burgeoning rivalry over Rachel (Amanda Wilkin). While Will gets in first with a cocksure flirtation, she leaves him for the quieter, more ruminative Dan. Their ambitions pull against each other: she has a place at Harvard, he's tied to Wales.

Halfway up, the two climbers hit an impasse: Will wants to turn back; Dan, to plough on. Whosoever digs their cramponed heels in deepest wins their way. When Dan strides ahead, Will drains their drinking water. The same struggle plays out between the sexes and, Cook suggests, it's often women that give way. The stories that survive, of historic, heroic achievements, are reflections of that – at least, until Rachel rebels.

Cook's characters are beautifully drawn and brilliantly played. Her male protagonists reflect twin peaks of masculinity. Donnelly's self-assured Will is imposing but never intimidating, while Monaghan is a deeper, darker soul, capable of disappearing for days. Pilgrims nails not only the indulgence of their adventures, costly as they are, but the insecurities built up beneath. It couples the brilliance of masculinity with its self-destructive, reckless, hubristic streak. Wilkin's Rachel might be modest and unassuming by comparison, but she's more grounded and set. Tamara Harvey's staging, gently insistent, elicits care for these characters, even as they stand for more than themselves, and Pilgrims is both poetic and political at once.

There's an extraordindary economy to Cook's writing. Her spare sentences double up as dialogue and statement, and she weaves layered ideas and images together. James Perkins delivers one of the richest designs of the year: a raised platform of white and blue tiles set on a golden grid. Not only does it form an abstract landscape, actors clambering around it or abseiling down it, it teases meaning out of the writing. The tiles, the sort that survive for centuries, are embossed with commemorative images of stories that, likewise, stick around. Nic Holdridge lights it superbly, with Welsh dusks and snow glare, and Jared Zeus's folk music floats through the action. A gorgeous piece gorgeously produced, Pilgrims is playwriting at its peak.

Pilgrims runs at the HighTide festival until 17 September, then at the Yard Theatre, London from 20 September to 16 October. It then runs at Theatr Clwyd from 18 to 29 October.