Is the WiFi someone else's private network? Or is it a "free" WiFi network like when you go in Starbucks and they allow you to use their WiFi as long as you register?
If it is someone else's private network, then you need to find the person, becomes friends with him/her and ask for the password and add your phone's MAC address to the router's Access List. Easier said than done.
Then I guess it depends on exactly what the error message states.
Also, as I stated above... If she setup an access list on there router then you need to ask her to add your phone's MAC address to that list. You will only be able to access the WiFi if you meet two conditions:
1. You know the password. Which you do.
2. Your phone's MAC address is part of the access list.
To find your phone's MAC address the generic steps are as follows (it may vary from phone to phone):
2. About Phone
3. Hardware Information
4. Scroll down until you see WiFi MAC Address, MAC Address, or something similar.
Note, you must activate your phone's WiFi in order to see the MAC Address.