You need to reset your network settings - tap Settings > General > Reset > Reset Network Settings.
And to the rest of you struggling with this problem:
Always check your connection by tapping Settings > WiFi > and the blue > next to your network name. If you are getting a 169.x address, then your router has not properly issued your touch an IP address. Common causes of this problem are:
1. Your router needs to be rebooted (just unplug the power cord for 15 sec or so)
2. WEP encryption (switch to the more secure, easier to use WPA2-psk)
3. Your router firmware is really out of date. Check your router maker's website for updated firmware.
More information on Apple touch networking can be found here:
http://support.apple.com/kb/TS1398