They would have to have changed the password to block you. Or gone into the modem's/router's settings and put a block in there.
If it is your modem/router, then you should be able to access that and fix the issue. If it is someone else's, then you will have to get them to fix the issue.