There is a lot of good information in the other other answers here, but they might be too detailed and technical for a lot of readers. I answer this question a lot for friends and family, since I work in the payment technology industry. So here’s my slightly-less-detailed, but (hopefully) easier-to-understand explanation.
You can think of the Merchant Account as the business component to accepting credit cards, and the Payment Gateway as the technical component.
Much like applying for a loan or line of credit, the Merchant Account is underwritten by a bank. The bank uses the underwriting process to determine the risk presented by the company that wants to accept credit cards (i.e. the merchant). This includes risk from cardholder chargebacks as well as the risk that the merchant might defraud customers.
The payment gateway is the server to which you connect your website or cash register. It connects to one or more of the processor networks. It let’s your website or cash register know whether a charge is approved by the cardholder’s bank, and then submits your charges for settlement, so you get
your money from the cardholder’s bank.
A processor is a system that connects the cardholder’s bank with the merchant’s bank, and the card brands (e.g. Visa, Mastercard, Discover, etc.), and makes sure that all of the money ends up in the proper place. In other words, the processors take the money from the cardholder’s bank account and deliver it to the merchant’s bank account.
For a long time, businesses would get merchant accounts and payment gateways from different vendors. As other posters have mentioned, there are new services that are “full stack” payments providers, and enable you to sign up with one vendor to get merchant account services and a payment gateway from one place. There are a lot of advantages to this: it’s a lot less work to get started, you get one point of contact for everything related to accepting credit cards, and as a bonus, you usually get a much more modern payment gateway.
Disclosure: I work for one of the best known full stack payments providers, Braintree. There is a lot more information on this subject on our website https://www.braintreepaym ents.com/