Suppose I am logging into Gmail by giving my credentials. Does my
plaintext get encrypted or is it first converted to the hash and the
And also if I am communicating to the bank web server and I am doing
transactions, is the bunch of packets first converted to a hash and
then the hash is encrypted, or is the plaintext of the packets
You have a great deal of misunderstanding. I can almost reverse engineer how concepts you have heard about, but did not understand, got mish mashed in your head into such a mess. There is no good way to answer your question except by finding out everything that you know wrong or just don't know and then explaining it. You should start with wikipedia.
You should read about the concept of layers in networking stacks, and how the technology that powers the web is layered.
You should read about how TLS works, at a high level, as a tunnel, and how TLS is used for all sort of things not just HTTPS and not just by browsers.
You should read a little about what modern browsers do with web pages loaded over https differently than with pages loaded over http, which is a separate thing from what TLS is, and is a thing that browsers try to do to make the web safer, and how limited they are because of ossification and backwards compatibility concerns.
For example, if you don't fully understand the following, keep reading wikipedia and stack exchange answers: Web forms submit data using HTTP POST requests. They don't know whether the textbox is type "password" or type "text". They don't know whether the form was loaded over http or https, whether there is js code loaded over http running in the same origin, whether the data is submitted over http or https, etc. Some user agent user interface (like "don't submit passwords over http" interacts with the page, but again, layering, what the User Agent does, etc.).
You should read what cryptographic hashing is, and how hashing is irreversible, etc.
You should read about password based key derivation functions and password storage. You might want to read about PAKEs and augmented PAKEs and how they are very rarely used.
In very short, pages loaded over https keep the conversation between you and the server private from and not changed by the coffee shop WiFi. The green lock icon (if present) does not mean anything about whether you should trust the server or not.
gmail and your bank see the plaintext of your password. They can store the plaintext of your password and can leak it, if they are incompetent.
In practice, gmail is competent enough to store your password securely, so they themselves don't know your password, don't store it, don't log it, can't tell you what it is, etc.
Banks are another deal. Some are competent, some are not. Unless they reveal to you that they know your password, you can't know whether they store it securely or not.