Do you have a router behind another router? If your ISP provides you with a gateway or a router and you connect another one downstream of it, you will have two DHCPs active and the behaviour you describe will occur. If so try connecting to the main router only and see if issue still occurs. There are ways of connecting one behind the other.
If not then try the steps on this User Tip:
1) Perform a Forced Restart: Hold down the Home and Wake/Sleep buttons at the same time for about 15-20 seconds until the Apple logo appears. Allow device to restart.
2) Reset Network Settings: Settings > General > Reset > Reset Network Settings. Rejoin the Network again.
3) Reboot Router/Modem: Unplug from power for 2 minutes and plug again. Update Router Firmware (check manufacturer’s support website for a newer FW). Also try different bands (2.4 GHz and 5 GHz) and different bandwidths (20 MHz recommended for the 2.4 band).
4) Change to Google's DNS: Settings > Wi-Fi > Click on the Network, Delete all numbers under DNS and enter 8.8.8.8 or alternatively 8.8.4.4
5) Disable device prioritization on the router if this feature is available.
6) Determine if other Wi-Fi devices on network are working well (other iOS devices, Macs, PCs).
7) Try device at another Network, i.e., neighbors’, public coffee house, etc.
8) Restore the Device (ask for additional for details if desired).
https://support.apple.com/en-us/HT201252
9) Go to an Apple Store for hardware evaluation.
User Tip: https://discussions.apple.com/docs/DOC-9892