That is the reason it gives that error. Are you sure you are connecting to the right WiFi as well. I have run into issues with different WiFis have similar names, people pick the wrong one.
Try forgetting the connection, restart the tablet and then try connecting again. If it still won't, and you are sure both the WiFi name and the password are right (no typos) then I would test your device on another WiFi. See if it will connect to it. If it will connect to other WiFis, then there is a problem with that specific WiFi. It could have restrictions on how many devices can connect. Some carriers/service providers have a limitation. Or it could have been blocked in the modem's/router's settings.
Now if it won't connect to other WiFis either, then there may be a hardware issue with the tablet.