Sir there is a few things you can do.
1) restore the gallery tables from a backup DB.
All " ppgal_xxxxxxxxxx " Tables and their Data. Perhaps even the old hacked database if you saved it, can help recover up-to-date records.
2) I have some code that will scan your images on the server, but it will take time to clean up the mess.
http://www.photopost.com/forum/showthread.php?t=135231
Hit me up on IM if ya need.