I encountered the same issue. I didn't find a solution yet, but I'd like share my opinion on the possible cause of this issue.
After I re-try the sign-in, the sign-in page shows an error indicating redirection loop or proxy loop error.
Sometimes, I get error message saying that I'm trying to login from an unexpected country, and I have to verify the log-in with a SMS message.
Some other cases, if I login the www.yahoo.com with the browser, with password and CAPTCHA, on the same connection, I re-try the login in gmail app, it works.
Most of the time, in the gmail app, when I re-try the log-in, I just get a dumb error message that leaves no clue.
My theory is that the yahoo server does a lousy job when it tries to balance between the user convenience and security. The server is too sensitive to "suspicious" login attempt, and didn't have a better way to offer CAPTCHA validation with the gmail login.