So called because in ancient times, Thai emperors would give a white elephant as a gift to someone who had displeased them. An albino elephant was regarded as sacred, so the new owner had to house it in a temple for people to come and worship it, and feed it special food. As a sacred beast, the owner could not make the elephant work, so it would eventually bankrupt him with the expense of keeping it.
The phrase has come to mean something that is more trouble than it's worth.