If you recently reset your security settings on Gmail, you will get that popup that OP posted. This is how I was able to get my email working properly again:
--By signing onto Gmail via web browser on iPad, logging on, clicking on Account, going to Security, and clicking on Authorizing Applications and Sites.
--Then I generated what it calls an Application-specific password.
--Once I got that password, I went to iPad's Settings > Mail, Contacts and Calendars and opened my email account settings and entered the password.
I had to do that for each Gmail account that I have.
I had to do this after I upgraded my security settings because of news of that big hacking attack on tech writer Mat Honan, which exposed flaws in Apple and Amazon security. One of the suggestions following that was to upgrade Gmail security, to try to ward off similar attacks.