What login info is needed to change email display name in Gmail?

I want to change my email display name in Gmail, and have gone into Settings/Accounts/Send email as. I changed my display name, and went to Next step, where I put in my username and password, and got a message:

Authentication failed. Please check your username/password.
[Server response: DNS Error: Address resolution of smtp.mydomain.com. failed: Domain name not found code(0) ]

Which username and password should I be using? I’ve tried the ones for my Gmail account, and also the one for Dreamhost, and neither work (though they do work to get into Gmail and my Dreamhost respectively). Any suggestions please?

In the Email address field, enter your name and email address. Click Next Step >>
In the SMTP Server area change the smtp to mail (example = mail.whateveryourdomainis.com )
User name will be the full email address (example@whateveryourdomainis.com )
Enter your password (what you set up in dreamhost) in password field. Leave everything else as is.

Should go through. Follow the instructions in the verification email.

Thank you saraj for your explanation. It turned out that the change wasn’t going through on my Mac, but did go through on a PC!