From left, plaintiffs Paul Katami, Jeff Zarrillo, Kris Perry and Sandy Stier are shown outside of the Supreme Court in “The Case Against 8.” (AFER/Diana Walker/HBO)

There are several great stories embedded in “The Case Against 8,” a sprawling yet engrossing documentary about the five-year court battle to overturn California’s ban on gay marriage, known as Proposition 8. Chief among them is the legal case, which wound its way from the Golden State’s courts to the U.S. Supreme Court. Those who are interested in the subject probably know the outcome, yet filmmakers Ben Cotner and Ryan White manage to transform the strategizing of attorneys — which only occasionally gets bogged down in transcript reading — into nail-biting drama.

That’s mainly thanks to the two plaintiff couples, Kris Perry and Sandy Stier, and Paul Katami and Jeff Zarrillo, who fought for the right to marry. Hand-picked for their appeal — like political candidates, as one lawyer notes — these telegenic Californians ensure that the film remains focused on what it is at heart: an old-fashioned love story.

But there’s another union that informs this tale. That’s the alliance between attorneys Ted Olson and David Boies, legal adversaries in the contested 2000 presidential election who came together to overturn Proposition 8. Theirs is a fascinating and counterintuitive partnership, and the film sheds as much light on it as it can, without taking attention away from the main subject.

Because there are so many angles to explore, something has to get short shrift. Personally, I’d love to hear more about David Blankenhorn, a vocal champion of Proposition 8 who, during the course of the legal fight, came to embrace the notion of gay marriage. The story of Blankenhorn’s 180-degree conversion is a footnote here, but it could easily fill another film.

★ ★ ★ ½

Unrated. At the West End Cinema. Contains brief crude language. 109 minutes.

“The Case Against 8” will premiere on HBO

at 9 p.m. June 23.