This article is from the Calendars FAQ, by Claus Tondering email@example.com with numerous contributions by others.
The Julian calendar introduces an error of 1 day every 128 years. So
every 128 years the tropical year shifts one day backwards with
respect to the calendar. Furthermore, the method for calculating the
dates for Easter was inaccurate and needed to be refined.
In order to remedy this, two steps were necessary: 1) The Julian
calendar had to be replaced by something more adequate. 2) The extra
days that the Julian calendar had inserted had to be dropped.
The solution to problem 1) was the Gregorian calendar described in
The solution to problem 2) depended on the fact that it was felt that
21 March was the proper day for vernal equinox (because 21 March was
the date for vernal equinox during the Council of Nicaea in AD
325). The Gregorian calendar was therefore calibrated to make that day
By 1582 vernal equinox had moved (1582-325)/128 days = approximately
10 days backwards. So 10 days had to be dropped.