Please make sure your WiFi network is configured in a way that allows Gateways to communicate with Kontakt.io servers. Detailed requirements are available in this article: Internet access requirements for Kontakt.io Gateways.
Pending configuration with incorrect WiFi settings
It's quite common that someone tries to manually configure a Gateway by editing the config.txt file. After providing a valid configuration and WiFi credentials this way, Gateway reboots, connects to a WiFi network, but drops the connections few seconds after that (its LED turns Orange).
This might be caused by a pending configuration for that Gateway being kept on Kontakt.io backend. It's possible that someone had initially tried to create a WiFi configuration for a Gateway via Kontakt.io Panel, but since Gateway didn't have any Internet connectivity set up, it wasn't able to download this pending config.
Now, after configuring the Gateway via the config.txt file, it has Internet connectivity, but one of the first thing it does is to download and apply that pending configuration, that might no longer valid. Because of that, if it looks like Gateway connects properly to your WiFi network and Interned (LED is Green), but it drops it really quickly, please make sure there are no pending configurations for this Gateway on Kontakt.io backend and then try to configure it once again.