When something like this happens or you just have a simple glitch within the phone. it is a good idea while the phone is still turned on, remove the battery and the SIM card for a few seconds and then put them back on and let the phone just reboot and do its thing. It is a mini computer and therefore needs special attention once in awhile.
It is also good to just clear out the cache and cookies too. (it won't help the connection) It is just good for the phone.