Actually, the Pirate King is wrong in his guess about who made the leap year decision. The basic decision to have leap year was part of the Julian calendar, which we don’t use any more (though the Eastern Orthodox do use it as their liturgical calendar).
The Julian calendar was instituted by Julius Caesar, but it isn’t accurate enough astronomically. Over the centuries, this inaccuracy compounded until it became intolerable as the Julian calendar got ten days out of synch with the astronomically observable markers.
The result was that Pope Gregory XIII decreed that in 1582 the calendar would be resynchronized to compensate for the Julian date’s inaccuracy and a new rule would be instituted regarding leap years. Now, instead of having a leap year every four years come rain or shine, leap year would be celebrated every four years except in century years (1700, 1800, 1900) unless the century year is divisible by 400 (1600, 2000, 2400). This makes it more complicated, but it also makes the calendar more accurate. The result is the calendar we use today, known as the Gregorian calendar after Pope Gregory XIII.
Catholic countries put the new calendar into use with some grumbling (ordinary folks didn’t like it because landlords might potentially try to scam folks out of more than a week’s rent due to the resynchronization). Many Protestant countries resisted it because of its connection with the pope. England didn’t adopt it until 1752, about a century before Gilbert and Sullivan’s time.
So who was the "person in authority" the Pirate King should have singled out? The British Astronomer Royal was a good guess, but in reality it was a combination of Julius Caesar and Pope Gregory XIII that hammered out the leap year rule.
Now what was all that about the Catholic Church opposing science and astronomy?