A gateway AP is an access point that has a wired interface configured with an IP address, that is connected to the to the LAN and has a route to the Internet. The AP only converts to a repeater when the AP cannot reach the default gateway on the LAN (which is usually a local firewall or router) or if the AP is unable to obtain valid IP address via DHCP.
If the AP is configured with a static IP, it will advertise "ssid name-bad gateway" when the default gateway is unavailable. If it has no other APs to mesh with that provide a route to the Internet, the AP will remain offline. If it does find a another AP with a route to the Internet, it will act as a repeater but the Dashboard will report that it has an invalid IP configuration.
If the Internet is unavailable and the SSID is configured to allow LAN access, the AP will continue to act as a gateway because it still has a valid IP and can reach the local router or firewall.
For more information related to this subject, please review the following KB's: