According to Eric Partridge's A dictionary of slang and unconventional English, Hong Kong dog is a tropical fever, and the term is originally 20th century Royal Navy slang.
His source for this is 'Taffrail', or Capt. H Taprell Dorling, DSO, RN, in Carry On, 1916, especially the article 'the Language of the Navy, originally published not later than 1915.
The term is comparable with Malta dog, another local name for traveller's diarrhoea, is also from Royal Navy sailors.
Hong Kong dog can be found as far back as 1899. The Philadelphia medical journal says:
Sprue (psilosis linguae, Hong-Kong dog, Ceylon sore mouth, etc.) is a chronic catarrh of the alimentary canal from the mouth to the anus, accompanied by tenderness of the tongue, diarrhea of a special character, and an atony and ...
Also from 1899, Madam Izàn: a tourist story says:
Cholera at Port Said, leprosy at Colombo — I heard of a family who had caught it in their washed linen — the plague here. Then the fog. And besides that, a fever they call the Hong Kong dog, which is nearly as bad as the plague
William Ernest Russell Martin's 1924 The adventures of a naval paymaster has a whole chapter on Hong Kong dog, unfortunately not readable via Google Books.
But why dog? According to slang lexicographer and author of Green's Dictionary of Slang:
The primary divisions are place-related, images of dancing or fast movement [e.g. Aztec two-step, Greek gallop, Rome runs, Tokyo trots], and rhyming slang usually based on 'the shits'.
As for dog, there's anecdotal sources describing either being "bitten" by the dog, or the onomatopoeic "barking" noises you made in corners when you were suffering from it.
At All Costs by Sam Moses describes Malta dog during WWII:
Sand flies flew out of the cracks in the limestone, carrying their fever. Cockroaches, bedbugs, and lice ruled. The "Malta Dog," a virulent form of dysentery, barked in the corners. The hunger never went away.
Band of Eagles by Frank Barnard also describes WWII pilots falling sick:
"Bitten at last by the Malta Dog"
Some forum postings agree:
The "Malta Dog," a virulent form of dysentery, When you got it you barked in the corners.
Malta dog - was what you were bitten by in flight the morning after a night in downtown Valetta in "the Gut", after consumption of copious quantities of Cisk or Hopleaf beer; or (God forbid), Farmers' Wife wine. Usually comprised of the runs interspersed with the odd projectile vomit, both accompanied by the "cheese-wire round the forehead" headache. If you had a good aim you could throw up out the beam lookout window of a Shackleton with little risk of blow-back. Thank the Lord those days are over.
Malta was the headquarters of the Royal Navy's Mediterranean Fleet from 1814 until the mid-1930s, so there was a large navy presence. This ties in with the Royal Navy roots in Partridge's etymology for Hong Kong dog.