Android Marshmallow (6.0.1) has a common issue with unreliable WiFi connections. If you find that your phone gets stuck "Obtaining IP Address" here's how to fix it.
You may have tried "forgetting" the network, rebooting your router, resetting your phone - all to no avail. The issue is with the DHCP client (software that negotiates IP addresses) new to Marshmallow. Thankfully this is easy enough to revert, without downgrading your phone.