With Iphones and Ipads if the router's wireless key starts with a letter (rather than a number) disable "Auto capitalisation". If set to "On" it will change the first letter of a sentence or password/wireless key to upper case. This will cause the password to be rejected if the router (or indeed wi-fi connection) is expecting a lower case character.
It can be found under Settings, General, Keyboard.