First of all, it's not possible because Gmail uses SSL (Secure Socket Layer) connections... avast! doesn't support and never will SSL connections. At least, that's what Vlk said...
Second - what Windows version you have ? All information is important. Rules are not the same for every version of Windows.
If you have Windows XP (Home or Pro) or any other NT based, you don't have to set anything in your e-mail client. Mail handling is automatic/transparent, no action from users are required. Set your e-mail accounts as if avast! doesn't exist.
If you have earlier versions of Windows, 95/98/98SE/ME, then just run Mail Protection Wizard and let it does it's job. Take a look at my signature for some info...
Cheers !