Gates is worth, I believe, about $40 billion USD. But a lot of his net worth is in things like Microsoft stock options and other non-liquid assets. This is a considerable amount of cash to donate, even for someone with his resources.
He does get some advantage from the donation, as the US Congress has passed a bill allowing donations to tsunami relief before 31 January to be reported as if they were made in 2004, reducing income tax liability.
It's still an impressive donation, and should be applauded regardless of mow much of his net worth it represents.