DAHLGREN, Va.—A warning siren bellowed through the concrete bunker of a top-secret Naval facility where U.S. military engineers prepared to demonstrate a weapon for which there is little defense.

Officials huddled at a video screen for a first look at a deadly new supergun that can fire a 25-pound projectile through seven steel plates and leave a 5-inch hole.

The...