Essentially the extra quarter of a day that the Julian leap year added was slightly longer than the 0.242 of a day left over in the actual solar year. It affected Pope Gregory XIII because the Christian holidays were being celebrated on the wrong days. This was noticed by the Pope's astronomers and prompted the need for change.
What's the science behind this?
The calendar currently in worldwide use for secular purposes based on
a cycle of 400 years comprising 146,097 days, giving a year of average
length 365.2425 days. The Gregorian calendar is a modification of the
Julian calendar in which leap years are omitted in years divisible by
100 but not divisible by 400. By this rule, the year 1900 was not a
leap year (1900 is divisible by 100 and not divisible by 400), but the
year 2000 will be a leap year (2000 is divisible by 400). The total
number of days in 400 years is therefore given by
The following National Geographic Article does a great job of describing the advent of the Gregorian Calendar. Also included, below, is a snippet from the Vatican's official website and more from Science World.
Leap Year Needed to Correct Calendar Drift
We observe the modern leap year because Earth orbits the sun every 365.242 days—not
an easy number for a calendar to accommodate.
The so-called Julian calendar reorganized the 12 Roman months into a 365-day year
with a leap year every four years. It was a tremendous improvement but
with a lingering flaw: The extra quarter of a day that the leap year
added was slightly longer than the 0.242 of a day left over in the
actual solar year. This seemingly small difference made the solar year
about 11 minutes too long, resulting in an entire day of discrepancy
every 128 years. Because of this glitch, the Julian calendar had
drifted ten days by the late 16th century. "Finally it became so
ridiculous that Pope Gregory XIII was convinced by his astronomers
that basically all the Christian holidays were being celebrated on the
wrong days," Duncan said. The pope introduced his Gregorian calendar
in 1582, which determined that only one out of every four "century
years" would observe a leap year. Thus while the years 2000 and 2400
are leap years, 2100, 2200, and 2300 are not. The Gregorian calendar
was gradually, and sometimes grudgingly, adopted by much of the world
and remains in common use.
Source: National Geographic News - Leap year (why)
for National Geographic News
Updated February 29, 2012
As noted the Gregorian calendar was not wholly accepted directly after the Pope's decree. In fact, the rest of Europe did not follow suit for more than a century.
NOTE: The Vatican Observatory can be traced back to Pope Gregory XIII. At the time it was referred to as Tower of the Winds. It was from this structure that Jesuit astronomers and mathematicians studied the scientific data which would later aid in the reform of the calendar which occurred in 1582.
The Protestant rejection:
(as noted by mgb in comment)
One of the original reasons the Gregorian calendar was designed was to restore the spring equinox to the March 21st date (Alexandrian Easter) that had been traditionally accepted since the Council of Nicaea. However, because this was mandated by the Pope many Protestant countries rejected the change.
The Gregorian Conversion In an age of intense religious passion, the simple fact that the Pope instituted the reform was
enough to make Protestant countries reject the change. The greater
part of protestant Germany did not switch to the Gregorian calendar
until 1700, the Protestant Cantons of Switzerland and Protestant
Netherlands until 1701. ...