One might say it all began with the development of the Julian calendar, named after Julius Caesar. He had introduced a calendar with 365 days and a leap year every 4 years with 365 days. This meant an average length of year of 365.25 days. But that extra 0.25 days for the mean Julian year made it in fact a smidgeon longer than what we define as the tropical year of 365.242374 days (or 365 days 5 h 48 min 46 s).
This set the stage for future problems, especially as the role of the astronomical point known as the vernal equinox (also associated with a date) came to prominence. (The vernal equinox marks the intersection of the ecliptic with the celestial equator. The ecliptic is the projected path of the Sun - as it appears from Earth - onto the celestial sphere, but in reality is the plane of the Earth's own orbital motion).
In the wake of the Edict of Milan, the Council of Nicaea in 325 A.D. defined the dates of Easter and certain other religious holidays by reference to the vernal equinox. . In particular, March 21 was re-specified as the date of the vernal equinox while Easter was defined to occur on the first Sunday after the 14th day of the Moon (e.g. days after the full Moon). It ought to be noted here that the Christians at Nicaea didn't willy- nilly just change the date of the vernal equinox from March 25 back to March 21. No, what happened is that between 45 B.C. and 325 A.D. that date had slipped back from March 25th to March 21st. The reason is based on simple math: Because the Julian year was defined with an average of 365 ¼ days and is 11 mins. 14 secs longer than the tropical year of 365 days 5 h 48 min 46 ec then the slight difference had accumulated to 3 days in those 4 centuries.
Anyway, the ecclesiastical choice of March 21 as the vernal equinox did not always agree with the precise astronomical definition, i.e. when the astronomical point described above transited the meridian. This year, for example, that occurs on March 20th. The proximity is close, but because it isn't exact divergence occurs.
The divergence was such that by 1582 Pope Gregory XIII was tasked with another adjustment. This is because the original tiny deviation between Julian and Tropical year, e.g. of 11 mins and 14 seconds, had grown to another 10 days so that the first day of spring was now occurring on March 11 and not the prescribed March 21. What to do? In order to re-align his now (Gregorian) calendar with the actual vernal equinox (or the Church's approximation to it) Pope Gregory removed ten days from the middle of October. This was undertaken on October 4, 1582 when the next day was proclaimed as October 15, 1582. (Some idiots at the time actually complained that the pope had "taken 10 days out of our lives".)
The effect of the Gregorian change was to realign the seasons but the primary goal was to calculate the date of Easter based on the Church's definition of the vernal equinox on March 21. Alas, not everyone in the world was committed so that much confusion reigned with different calendars and dates being kept in different places. Britain, for example, kept the old Julian calendar until 1752.
In the wake of the above the rule for the leap year was changed so that the average length of the year would closely approximate the length of the tropical year. The rule then applied was that only century years divisible by 400 would be leap years. Thus, 1700, 1800 and 1900 - all leap years under the Julian calendar - were not under the Gregorian, while 1600 and 2000 were.
Meanwhile, the average length of the Gregorian calendar, at 365.2425 days, was correct to within 1 day every 3300 years.
Incredibly, a more rational World Calendar was proposed in the 1950s, according to USF visiting astronomy professor Anthony Aveni. The benefit of this calendar would mainly be that it is identical from one year to the next - so fewer calendars would have to be printed. Alas, the U.S. - after objections from religious groups, rejected it.
The takeaway? While we often view timekeeping as a precise enterprise, the interjection of politics and religious' dogmas often undermines that assumption. Today, people need to remember that as they do whatever on this special day.