there are two hurdles to cross with a WLAN connection:
association and authentication
association means you have the ssid correct as well as things like the channel and frequency (e.g. 802.11b channel 6, ssid = linksys)
authentication means you have the encryption settings set correctly at both ends, which can include WEP, WPA, 802.1x as well as open or shared key, etc.
99.99% of the time, when WLAN cannot connect, it is because the authentication failed. Either the wep keys do not match on each end, WPA is set incorrectly, or the WEP'open vs. shared' setting is incorrect. A quick way to observe this is to look at the 'status' of the windows network adapter...if there are packets sent and none received, then you have not authenticated.
A couple of 'gotcha's with Windows XP:
1) In Windows XP, the first wep key is key 0, not key 1. Most access points use keys 1234 while microsoft, in it's infinite wisdom, uses keys 0123. So key 1 in the AP must be the same as key 0 in the client.
2) Be sure 802.1x authentication is disabled on the PC, (unless you are using it, of course).
3) Sometimes the XP firewall messes you up, as do many other personal firewalls.