Iphone doesen't connect to Wi-Fi?

I have an Iphone 5. (64 gb version).it used to connect to the Wi-Fi. It identifies my Wi-Fi. When i try to log in it says, unable to connect with ___. I have a home Wi-Fi. Its range is very high. (speed is 20 mbps) I've saw many people owing Iphone 3gs and Iphone 4 having this problem. But i dunno why on Iphone 5.

I think the problem is not with speed but Wi-Fi channel. If you know how to change the channel, try to keep it between 1 and 5. If not, try to reconfigure your Wi-Fi.

Some Wi-Fi systems are "push to connect".
Try "forgetting" the network and reconnect with passcode again.
Make sure you haven't turned Wi-Fi off or airplane mode on…

Try resetting your Wi-Fi.

It's not your phone's problem.
Everytime you turn your modem On and Off, you get a dynamic IP which keeps changing.
This is why we have to 'Forget this connection' first and then re-connect it again.