From Benford's Gilbert and Sullivan Lexicon:
H.M.S. Pinafore was Gilbert and Sullivan’s first great joint success, and it brought them outstanding fame on both sides of the Atlantic. The show opened at the Opera Comique on May 25, 1878. Although initially well received, an exceptionally hot summer kept audiences away until Sullivan started playing selections from the show at promenade concerts for which he was the musical director. That turned the tide; the opera went on to run for more than 570 performances, and it has been one of the most popular works on the musical stage ever since.
In H.M.S. Pinafore Gilbert satirizes British class consciousness and pokes fun at a First Lord of the Admiralty who knows little about ships –– which just happened to be true to life in England at the time. In Pinafore, too, Gilbert firmly established the style of producing humor by treating a thoroughly ridiculous situation in a thoroughly serious manner. He added to the effect by insisting on accurate settings and costumes, and by rigidly restraining actors who wanted to ham up his lines or engage in any sort of slapstick. H.M.S. Pinafore remains a joy as well as a landmark in the history of musical theater.