Hey,
Try Resetting Network Settings on the iPhone, go to Settings> General> Reset> Reset Network Settings.
This can also happen if the iPhone is connected to a Wi-Fi network but has a self-assigned IP address.
You can find the IP address by tapping Settings> Wi-Fi> the blue (>) next to your Wi-Fi network. This article:
http://support.apple.com/kb/TA26003 provides more information about 169.254.x.x IP addresses.
-Jason