It is a story as unlikely as a boy who can fly: Hollywood’s biggest studio is in the midst of a prolonged slump at the box office at the same time it is racking up a high score in videogames.

The fairy tale reboot “Pan” bombed with a $15.5 million opening this weekend, likely landing it where most of Warner Bros.’ big-budget movies this year have: in the red. With a production budget of at least $150 million, “Pan” joins other high-profile Warner flops, including “Jupiter Ascending” and “The Man From U.N.C.L.E.,” along with...