A merchant account is something you set up with a bank. It's sort of like a regular bank account, but the banks tend to set a lot more rules you have to comply with before they give you a merchant account.
A payment gateway is a service that is set up to process the credit card transaction. It stands in between your shopping cart and your merchant account.
So, someone chooses to buy something through your cart. Once they enter their credit card details, the payment gateway receives the information, checks with the customer's bank that it's all OK, approves the transaction, and directs the payment to your merchant account, where you can collect it.
Without a gateway, there's no way for the money to get from the customer to your merchant account. The merchant account doesn't do any work. It just sits there, waiting for money to arrive.
The gateway and merchant account each have their own fees, because they are separate services.
If all this is too much hassle, there are alternatives like PayPal—which provides a cart, gateway, and a kind of merchant account all in one. After the purchase, you can move the money that PayPal has collected into your regular bank account.