I faced a similar problem since months on my Android phone ( Jellybean and Kitkat ). The problem some how used to come and go and recently it was the same again. After spending a couple of hours with many hit and try things with my phone and router I finally found a good article which solved this problem ( at least ) for me.
Settings, Apps, All, Clear data in google services framework and restart
Read the above article as it has a lot of other methods also but in my case none of the others worked. Check if anyone works in your case.
Before following above steps I would kindly request to go through the article about what things can be impacted when Google Services Framework data is cleared.
In my case I have tried almost everything and nothing worked. Clearing the google services framework data was the last option left and I gave it a try. My case - it worked well and I did not even have to restart the phone, I was able to connect the WiFi.
Hope it helps.