You would use an inner join to join in the column you need... so your query now is:
SELECT * FROM gallery_category WHERE GalleryPage = %s ORDER BY GalleryOrder ASC
it would be updated to something like:
SELECT ProductName, gallery_category.* FROM gallery_category INNER JOIN gallery_category_contents ON gallery_category_contents.PageID = gallery_category.GalleryPageID WHERE GalleryPage = %s ORDER BY GalleryOrder ASC
I don't know the correct join column name from the gallery_category_contents page, but it would be something like the above.