The Apple products, iPhone, iPad and Mac computers sometimes has problems when connecting to a wifi network where other devices have no problems. The problem seems to be in the encryption used.
Make sure the router doesn’t have WPA/WPA2 mixed mode enabled, i.e. set it to WPA2 only. If encryption is configurable, use AES (not TKIP or TKIP/AES).
You can also read more about Apple recommendet wifi router settings here: https://support.apple.com/en-us/HT202068