Call apple to do a hard reset and its iPhone 5 ( not 5s) if that don't work I would return it for a new one
How far you are with home wifi unit?
Are you on the same floor?
you may need a repeater or another wifi
See get Wifi stand next to the unit
Some old Wifi need to up date softwear what is your set on wifi?
look on the information on google
I do not know what your house made out of, but some room the wifi will be weak.
that why I need second wifi unit for the bed room.
some Wifi unit only good 100 ft some are good for 300 ft
right of verizon name at top left corner there will some bars you need three or four bars to work.
before you do a hard reset, go into wifi and "forget" this network, make sure you put your key in correctly and try again
Did you change your wifi password? Are you able to connect another device using the same password key?