In the Gregorian calendar, the tropical year is approximated as 365 97/400 days = 365.2425 days. Thus it takes approximately 3300 years for the tropical year to shift one day with respect to the Gregorian calendar.
The approximation 365 97/400 is achieved by having 97 leap years every 400 years.
These are calculated as follows : Every year divisible by 4 is a leap year. However, every year divisible by 100 is not a leap year. However, every year divisible by 400 is a leap year after all.
So, 1700, 1800, 1900, 2100, and 2200 are not leap years. But 1600, 2000, and 2400 are leap years.
(Destruction of a myth: There are no double leap years, i.e. no years with 367 days. See, however, the note on Sweden lower down this page.)
This rule has, however, not been officially adopted.
This was observed in Italy, Poland, Portugal, and Spain. Other Catholic countries followed shortly after, but Protestant countries were reluctant to change, and the Greek orthodox countries didn't change until the start of this century.
The following list contains the dates for changes in a number of countries.
Albania: December 1912 Austria: Different regions on different dates 5 Oct 1583 was followed by 16 Oct 1583 14 Dec 1583 was followed by 25 Dec 1583 Belgium: Different authorities say 14 Dec 1582 was followed by 25 Dec 1582 21 Dec 1582 was followed by 1 Jan 1583 Bulgaria: Different authorities say Sometime in 1912 Sometime in 1915 18 Mar 1916 was followed by 1 Apr 1916 China: Different authorities say 18 Dec 1911 was followed by 1 Jan 1912 18 Dec 1928 was followed by 1 Jan 1929 Czechoslovakia (i.e. Bohemia and Moravia): 6 Jan 1584 was followed by 17 Jan 1584 Denmark (including Norway): 18 Feb 1700 was followed by 1 Mar 1700 Egypt: 1875 Estonia: January 1918 Finland: Then part of Sweden. (Note, however, that Finland later became part of Russia, which then still used the Julian calendar. The Gregorian calendar remained official in Finland, but some use of the Julian calendar was made.) France: 9 Dec 1582 was followed by 20 Dec 1582 Germany: Different states on different dates: Catholic states on various dates in 1583-1585 Prussia: 22 Aug 1610 was followed by 2 Sep 1610 Protestant states: 18 Feb 1700 was followed by 1 Mar 1700 Great Britain and Dominions (including what is now the USA): 2 Sep 1752 was followed by 14 Sep 1752 Greece: 9 Mar 1924 was followed by 23 Mar 1924 Hungary: 21 Oct 1587 was followed by 1 Nov 1587 Italy: 4 Oct 1582 was followed by 15 Oct 1582 Japan: Different authorities say: 19 Dec 1872 was followed by 1 Jan 1873 18 Dec 1918 was followed by 1 Jan 1919 Latvia: During German occupation 1915 to 1918 Lithuania: 1915 Luxembourg: 14 Dec 1582 was followed by 25 Dec 1582 Netherlands: Brabant, Flanders, Holland, Artois, Hennegau: 14 Dec 1582 was followed by 25 Dec 1582 Geldern, Friesland, Zeuthen, Groningen, Overysel: 30 Nov 1700 was followed by 12 Dec 1700 Norway: Then part of Denmark. Poland: 4 Oct 1582 was followed by 15 Oct 1582 Portugal: 4 Oct 1582 was followed by 15 Oct 1582 Prussia : 22 Aug 1610 was followed by 2 Sept 1610 Romania: 31 Mar 1919 was followed by 14 Apr 1919 Russia: 31 Jan 1918 was followed by 14 Feb 1918 Spain: 4 Oct 1582 was followed by 15 Oct 1582 Sweden (including Finland): 17 Feb 1753 was followed by 1 Mar 1753 (see note below) Switzerland: Catholic cantons: 1583 or 1584 Zurich, Bern, Basel, Schafhausen, Neuchatel, Geneva: 31 Dec 1700 was followed by 12 Jan 1701 St Gallen: 1724 Transylvania : 14 Dec 1590 was followed by 25 Dec 1590 Turkey: 18 Dec 1926 was followed by 1 Jan 1927 Tyrol : 5 Oct 1583 was followed by 16 Oct 1583 USA: See Great Britain, of which it was then a colony. Yugoslavia: 14 January 1919 was followed by 28 January 1919 but parts of the country had changed over earlier.
Sweden has a curious history. Sweden decided to make a gradual change from the Julian to the Gregorian calendar. By dropping every leap year from 1700 through 1740 the eleven superfluous days would be omitted and from 1 Mar 1740 they would be in sync with the Gregorian calendar. (But in the meantime they would be in sync with nobody!)
So 1700 (which should have been a leap year in the Julian calendar) was not a leap year in Sweden. However, by mistake 1704 and 1708 became leap years. This left Sweden out of synchronisation with both the Julian and the Gregorian world, so they decided to go ‘back’ to the Julian calendar. In order to do this, they inserted an extra day in 1712, making that year a double leap year! So in 1712, February had 30 days in Sweden.
Later, in 1753, Sweden changed to the Gregorian calendar by dropping 11 days like everyone else.
It should be noted that the Gregorian Calendar is useless for astronomy because it has a ten-day hiatus in it. For the purpose of calculating positions backward in time, astronomers use the Julian Date Calendar.
Thanks to Claus Tondering for most of this information.