In order for the Tasktop Gmail integration to work, you must ensure IMAP is enabled on your Gmail account. Log into gmail.com and click Settings in the top right corner of the web page. Click the "Forwarding and POP/IMAP" tab. Under the IMAP Access section, ensure Enable IMAP is selected. Press the "Save Changes" button to apply this change. Retry validating your Gmail Task Repository in Tasktop.
Additionally note that Gmail's IMAP support is currently only available for people who have set the language of their interface to English (US). To update this for your account, log into gmail.com and click Settings in the top right corner of the web page. Select the General tab and under Language, choose English (US).
If you have google's 2-step password authentication enabled, you will need to setup an application-specific password for use within Tasktop (similar to setting up a mail client such as Outlook). To do this, you can follow the steps on the google support page about application-specific passwords.