Google provides a good list of diagnostics instructions that you can perform when you get Connection Errors retrieving email, or starting GTalk or the Google Play Store. These are an exhaustive list, but you can get this error for one more reason.
If you remove the battery and the SIM card from the phone and later restart, the connection error happens. Simply because, removing the battery reset the date and time on the phone. With the result, that any access to a Google resource like Play Store or GTalk or GMail just does not work. You will still be able to surf the internet.
To overcome this error, change the date to the current date. The best way to keep the date current at all times is to go to Settings -> Date and Time -> check Automatic so that data and time are retrieved from a Network Time Server.