I starting having this same problem with all accounts associatiated with AT&T/Yahoo. For years I have had the same GMail, AOL, Hotmail (MSN), and Yahoo/AT&T email addresses. And, for years, I have been using OS X Mail as my mail program for all the email addresses. I have not had any problems in the past with login issues related to any of these accounts.
In the last month or so, every few minutes while the OS X Mail program is running I will get a pop-up window that states, "Mail can't connect to the account "xxxxxxx". Enter the password for user "xxxxxxxx@xxxx.xxx". I then enter the same password I have always used for that account and it then successfully connects. However, several minutes later, I will get the same pop-up message for the same accounts. These only come up for accounts associatiated with AT&T/Yahoo.
I logged directly into my AT&T/Yahoo accounts through my browser and am successful in connecting to them.
I clicked on the link above in Eric Root's response titled, "Mail Keeps Asking for Password" to see if I did have a misconfiguration in my Keychain Access program, despite the fact that this problem has just started after years of it being configured correctly. I went through the process indicated at that link. None of the checkboxes in the "login" Keychain Settings were checked. So, that was not the problem.
Something has changed recently, either with the AT&T/Yahoo login servers or with the OS X Mail program. I think it is more likely to be the AT&T/Yahoo servers. However, that still does not give me an answer to this annoyance.