The Battle of Waterloo occurred on June 18, 1815, and according to Webster's dictionary, it gave its name to the very notion of final defeat. Why? Maybe because the battle ended one of the most spectacular military careers in history (Napoleon's), as well as 23 years of recurrent conflict between France and the rest of Europe. In addition, it was Napoleon's second "final defeat."
Napolean was defeated and exiled in 1814, but he escaped his confinement, returned to France, and was restored to power for three months before meeting defeat at the hands of the forces allied under the Duke of Wellington near the Belgian village of Waterloo. The word "waterloo" first appeared in casual use the following year, 1816.
Nowadays, when we use the word casually (as in, not referencing the official battle), it is lowercased (like "waterloo"). It simply means a big loss or setback.
For more information about Napoleon, read this Wikipedia entry or check out this page about the Battle of Waterloo.