If you can afford it, get both!
PS2 has the best games right now. But like others have said, its future is more dim than X-Box's.
X-Box has some good titles out right now as well, and a pretty bright future. With games like Unreal Championship, Crazi Taxi 3, House of the Dead 3, Sega GT 2002, Star Wars: Knights of the Old Republic, and more to be announced at E3 as some of its exclusives, I think the next year will be a very good year for X-Box. Not to mention it seems to be getting alot if the big titles that are coming to other systems (or are already on them). (For example: GTA3, Some sortof Metal Gear Solid game, Turok Evolution, EA Sports titles).
As long as good games keep coming out for X-Box, it will hold the edge to PS2 because of its advantages in hardware. Graphics capabilities aside, X-Box has HDTV support, Dolby Digital 5.1 support in hardware (PS2 can do DTS Surround in software), plus more hardware for your dollar (Ethernet/hard drive).
So it really depends on what you want to do. If you intend to keep the console for the next 5 years and not buy another console, get X-Box now. If you think maybe you want to play some games for the next year and pickup another console in a year or so, keep the PS2 and get the X-Box at the next price drop.