Mail.app keeps asking for Google password
If you have several devices accessing your Google account via IMAP you can reach the limit of connections Google permits. The limit is 15 connections per account, however, bear in mind that each client can open multiple connections. In my experience the limit is easily reached with 3 devices. I have read that the Thunderbird email client has a setting to specify how many connections it can open, Mail and Outlook do not have this option.

Your Mail client should prompt you with a message along the lines of "Too many simultaneous connections." However I believe on iOS devices and Apple Mail you may see a more generic error. 

The workaround for this issue is to log in to the GMail web interface, scroll to the bottom of the page and click the 'Details' link. From the popup window click 'Sign out all other sessions'

support.google.com/mail/answer/97150?hl=en