I had the same problem, apparently the config didn't recognize the before password so I had to create a new one on the terminal
sudo -u postgres psql
ALTER USER username WITH PASSWORD 'your new password(the quotes remain)';
not only that, because I was using pg Admin and for it to connect I had to close then open so I can input the new password after that everything just started working.