Quite recently you might have experienced the problem of not being able to get online with your google talk / gmail account any more when using the latest versions of empathy (shipped/updated with Ubuntu 11.04) or pidgin (installed with Ubuntu 11.04). As I understand it, this has to do with the way instant messenger clients connect to google, since there were some changes on google's side to make things safer. This HowTo shows you how to resolve this problem and get online again.
Empathy (the standard chat client in Ubuntu 11.04)
In the menu go to Edit/Accounts and click on your google account. In the configuration details look for "Advanced" and click on it. A bit further down you'll find the area titles "Override server settings", here you have to make the changes to make things work again. In the field "Server" enter talk.google.com and in "Port" enter 5222. Click Apply on the bottom and disable/re-enable the account to make empathy use the changed setting by clicking "Off" and then "On" at the top right of the window. You should see the green bubble next to your account on the left side of the window now - you're online again with google talk / gmail.
Here it's pretty much the same: Go to Accounts/Manage Account, click on your google account and click on "Modify" at the bottom. On the top choose "Advanced", in the field "Connect Port" enter 5222 and in "Connect Server" enter talk.google.com. Click on save, disable/re-enable the account to make pidgin use the new configuration be unselecting/selecting your google account in the column "Enabled". Click on "Close" and you should see, that you're finally online again.