Nowadays this term is often encountered in the variant spelling `kludge'. Reports from old farts are consistent that `kluge' was the original spelling, reported around computers as far back as the mid-1950s and, at that time, used exclusively of hardware kluges. In 1947, the "New York Folklore Quarterly" reported a classic shaggy-dog story `Murgatroyd the Kluge Maker' then current in the Armed Forces, in which a `kluge' was a complex and puzzling artifact with a trivial function. Other sources report that `kluge' was common Navy slang in the WWII era for any piece of electronics that worked well on shore but consistently failed at sea.
However, there is reason to believe this slang use may be a decade older. Several respondents have connected it to the brand name of a device called a "Kluge paper feeder" dating back at least to 1935, an adjunct to mechanical printing presses. The Kluge feeder was designed before small, cheap electric motors and control electronics; it relied on a fiendishly complex assortment of cams, belts, and linkages to both power and synchronize all its operations from one motive driveshaft. It was accordingly tempermental, subject to frequent breakdowns, and devilishly difficult to repair --- but oh, so clever! One traditional folk etymology of `kluge' makes it the name of a design engineer; in fact, `Kluge' is a surname in German, and the designer of the Kluge feeder may well have been the man behind this myth.
TMRC and the MIT hacker culture of the early '60s seems to have developed in a milieu that remembered and still used some WWII military slang (see also foobar). It seems likely that `kluge' came to MIT via alumni of the many military electronics projects that had been located in Cambridge (many in MIT's venerable Building 20, in which TMRC is also located) during the war.
The variant `kludge' was apparently popularized by the Datamation article mentioned above; it was titled "How to Design a Kludge" (February 1962, pp. 30, 31). Some people who encountered the word first in print or on-line jumped to the reasonable but incorrect conclusion that the word should be pronounced /kluhj/ (rhyming with `sludge'). The result of this tangled history is a mess; in 1993, many (perhaps even most) hackers pronounce the word correctly as /klooj/ but spell it incorrectly as `kludge' (compare the pronunciation drift of mung). Some observers consider this appropriate in view of its meaning.