It should work fine with g. What kind of error does it give? Password or just can't connect?

If you know the password is right reboot the phone, or go to Settings/General/Reset, Reset Network settings, maybe try a reboot after that.