I got this problem on my iPhone 5 after updating to 8.1.2
I randomly lost access to my wifi on my iphone and no amount of password entry would solve it. Tried resetting network settings etc. I use a BT hub3, by the way and that has always been rock solid.
All my other devices, ipad, appletv, macbook etc were fine. I figured I would try changing the WPA key on the hub, and lo and behold it worked (i changed the last character from a 6 to a 7) obviously, I then lost access from my macbook so I re-joined the network on that, and set the password back on the router to the one ending in 6.
My ipad then was able to work as before and I was able to join the iphone5 to the network once more. Very odd.
The only thing I can think is that Apple have introduced a new feature to change the mac address on the wifi to prevent snooping...
(http://www.theregister.co.uk/2014/06/10/ios_wi_fi_mac_address_trick/)
I wonder if this feature has caused a temporary glitch on my hub as it got introduced? I am sure my wifi mac address is now different to what it was in the past, looking at the hub records. Perhaps my hub thought another device was trying to spoof my iphone, and stopped it connecting, Who knows, but yes - changing the wifi password and changing it back certainly helped me.