Incorrect password when trying to connect to Wi-Fi on iPhone 6s when password is correct?

I bought an iPhone 6s today. Everything was okay, however, I got an "Incorrect password" notification when trying to connect to my Wi-Fi. I'm sure that my Wi-Fi password is correct. When I tried connecting to my mother s personal hotspot, it still notified me that my password was incorrect when I clearly typed in the exact password of my mother s hotspot. I have tried resetting network settings and restarting my modem, but I still am unable to connect to my Wi-Fi. My iOS is version iOS 9. I bought the iPhone 6s today.

Contact Apple support or take the phone back to the vendor.