Were the photos on a micro-SD card? You can try removing the card and using an adapter or card reader to see if the pics are still actually on the card. Then transfer them to your computer. When you reinsert the card into the phone, it may re-establish a connection.
If it doesn't, you can try reformatting the card in the phone (which will erase everything on the card, so be sure to copy it all to your computer first!) to see if that allows you to see the card again.