you should have a gallery table:
galleries:
galleryID - Primary Key
galleryName
etc
then have a galleryimages table:
galleryimageID - Primary key
galleryimageGalleryID - relates to galleries.galleryID
galleryimageImage - stores the gallery image file name
you will have:
a page that is used to create a new gallery
a page that shows the galleries that have been created and has a link that passes the gallery ID to a page to insert images for the selected gallery