are you getting a 169.xxx ... address?
Check and see what IP address your getting
it will be in settings\wi-fi..
If it is a 169.xxx address its likely that the wireless is not quite set up correctly.
For me I'm using WEP security. When I had a connection issue it ended up being that the WEP key index I had set in my router was different than what the iPhone (or at least iPod Touch) expected and it doesn't have a method of setting the key index. I changed my router to use key index 1 and that resolved my problem.