I am having the same issue with my son's iPhone 5.
The router is a Time Capsule, and 3 other iPhones (one of them also a 5), two iPads, five computers and a few other devices connect fine to it. This iPhone 5 started acting up last week after working correctly for months.
If I extend the network using an Airport Express, the phone can connect just fine to the new node (same password, of course), but if it tries to connect to the Time Capsule itself I'll get the "Unable to join ..." message.
I've tried rebooting the phone, forgetting the network, resetting the network settings, etc.
My other iPhone 5 can connect just fine, and this phone can connect to other networks.
It appears that the problem is that the phone is rejecting this particular router or vice versa.
Any ideas?