I downloaded this gmail app from the internet. The left photo is on the dock with out the logo.The photo on the right shows the color and the M logo. Is there a way to add that colored M logo to the dock?
That's not an app, it's a shortcut to the Gmail webpage that opens in your default browser, which appears to be Chrome. There is no Gmail app for Mac from Google. The photo in this post refers to an Android app in the Google Play Store.
As already mentioned, there is no official Gmail app for macOS. It looks like you are trying to add a shortcut to the Dock that takes you to the Gmail site. Check out this video on how to do it properly, so that the M logo shows up.