> Why is no one pointing out that, in order to receive bitcoins on the Lightning Network (LN), you need to lock bitcoins in a payment channel?
Because it is false. To receive bitcoins on the LN you need to have a node. Other parties can open a channel with you to send you money.
> lock up bitcoins in a payment channel which can only send bitcoins to that given merchant
This is again false. The consumer can pay anyone on LN. The nodes you call "gateways" are just regular nodes, some with more funding than others. You can choose to run a regular node and keep it online and use it to route payments for other, or you can use a light wallet that opens a private channel and uses channel hints to route payments through his private channel to the network.
Bitcoins "locked" in a channel are not locked at all, You can send them to whoever you can route to on LN, or get it back to a regular on-chain wallet. And nowadays a well connected node reaches every other node.
> the gateway needs to know how many bitcoins the merchant will receive
No, the gateway needs to manage cash flow like every other money-transacting entity. There just needs to be enough capacity, like you need enough cash in a cash register. You do not need to know in advance the sum.
And you can replenish and empty channels with one on-chain tx, so no need to close and re-open channels.
> the gateway needs to borrow this amount of bitcoins in the market and lock it up in a payment channel between it and the merchant.
You got it wrong.
First, gateways (that are just regular nodes, some running on raspberri pis) are already online, and with funding (https://1ml.com/). Those are already denominated in btc, so price do not affects funding capability.
Second, replace "gateway" with "the LN network". A gateway has some funding and locks it up in some channel to the LN network (meaning some other nodes)
Third, those bitcoins are not really locked for anything, but let's keep using this word.
So the "gateway" can be anyone with some bitcoins he might want to spend on LN (or not).