Mikrotik does not connect to the gateway server

You need to make sure from your gateway you can see the TTN.