A gateway (router) does not change the MAC addresses, it discards them. MAC addresses are layer-2 addresses. A router will strip and discard the layer-2 frame. It then performs a lookup on the layer-3 address on the packet, switches it to a new interface, and builds a new frame for the new interface network type.
Not all layer-2 protocols use MAC addresses, some use 48-bit MAC addresses, and some use 64-bit MAC addresses. The new frame will be for the network type of the new interface, and it may not have a MAC address at all. If it does, then the new source and destination MAC addresses will be for the new link, not the old link.