Password settings do not appear!
Welcome to Apple.SE JONAllow. What you're seeing in the mail app is the expected behaviour of the mail app. Both of the screenshot are of two different conditions i.e. Gmail and Company account. 

Gmail doesn't allow server settings to be changed via Mail.app Preferences pane. While, accounts such as of an institute of study or work have to be configured in server settings via said pane.

So to change passwords, I suggest going to Mac Preferences -> Internet Accounts,   select the said account, click "-" in the bottom. And add it back. 

IMAP mailbox will not pose any problem restoring all mails. It might take time though. 

One unverified alternative is that you see the sidebar in the mail and find a 



error sign. Tap on it and see if it gives other options like "Try again" and hope for a password reset prompt. You might see "System Preferences want to use google.com". Allow it.

Hope it helps!