The diarrhoea (spelled in America as diarrhea) that is often suffered by tourists when travelling to foreign parts.
Montezuma II (also spelled Moctezuma II) was Emperor of Mexico from 1502 to 1520 and was in power when the Spanish began their conquest of the Aztec Empire. The sickness, colloquially known as the 'squits/runs/trots' and more formally as 'Traveller's Diarrhoea', is usually caused by drinking the local water or eating food that visitors aren't accustomed to. It is a bacterial illness, always uncomfortable, and occasionally serious. Most cases are caused by the E. coli bacterium.
The revenge element of the phrase alludes to the supposed hostile attitude of countries that were previously colonized by stronger countries, which are now, in this small but effective way, getting their own back.
There are many countries that were previously colonised that are now tourist destinations, and names for the condition reflect the part of the world concerned. These euphemisms are usually comic, reflecting the embarrassment felt by the sufferer and the amusement of the lucky non-sufferers. Of course, although Montezuma clearly had no reason to love the Conquistadors, his revenge isn't reserved for Spaniards - other names for it are:
The Gringo Gallop
The Aztec Two-step
Those unlucky enough to suffer from the condition in Asia might hear it called:
Gandhi's Revenge, Delhi Belly, The Rangoon Runs, Bombay Belly (India)
Gyppy Tummy, The Cairo Two-step, Pharaoh's Revenge, Mummy's Tummy (Egypt)
Bali Belly (Indonesia)
Travellers from Asia to the west are just as likely to suffer the illness, as it isn't caused primarily by insanitary conditions but by ingesting a strain of the E. Coli bacterium that one's body is unaccustomed to - an event just as likely in London and Los Angeles as it is in Cairo and Kuala Lumpur.
Delhi Belly and Gyppy Tummy were the first of these terms to gain wide usage and they appeared during WWII, when many British and US servicemen were fighting in North Africa and Asia. The earliest citations in print are from the Indiana Evening Gazette, October 1942:
Americans on duty overseas are learning also to guard against "Teheran tummy" and "Delhi belly"
and in Alan Moorehead's A Year of Battle, 1943, which pretty much sums things up:
"Few set foot in Egypt without contracting 'Gyppy Tummy'... It recurs at irregular intervals and it makes you feel terrible."
As a phrase, Montezuma's revenge isn't particularly old. The earliest citation of it in print that I can find is from the US newspaper The Modesto Bee, February 1959:
In Mexico it sometimes is called the Aztec curse, Montezuma's revenge... and other colorful names. It can be either a mild or explosive illness.