Hi. When iOS connects to WiFi, it asks Safari to load that URL from the internet. One of three possibilities then occurs:
1. You are on a "captive" network that requires you to view a web page, and possibly login, the network sends its login page, you agree, the network allows your request to go through, and iOS cancels Safari.
2. You're on a normal home or business network, the request is completed, and iOS cancels Safari.
3. You have no internet access, or the router blocks the URL. Safari remains open, displaying the URL that failed to load, a blank page. This situation is not expected by iOS and should "never" occur.
You are experiencing the third situation. You need to check that your router can access the internet, and the URL is not being blocked by the router. If that's OK, try restarting the router, then Settings > General > Reset > Reset Network Data, then try to connect again.
Are you trying to connect through a WiFi extender (repeater)? Some users have reported this happens with an extender.