If you want to consider JavaScript, I would find a third party gallery and use that instead of "brewing" your own. You'll need to use JavaScript to dynamically generate HTML and that can get complicated, especially if you're using PHP already to generate HTML.
It sounds like you're wanting to save time from manually putting the gallery together. Having PHP generate the HTML would be the most efficient way to do that unless you use your web design tool to help you. Perhaps it has some functions you can use to better handle the repetition involved. With that being said, there's always "copy/paste/update" (where you define one thumbnail, copy it, paste it each time for the others, and update the pasted ones to have the right images).
There's no way to get around doing the work of getting the images setup to function in the gallery. Either you do the work manually or you program a computer to do it. Using PHP will effectively program the server to do the work. Using JavaScript program the local browser to do the work. If you go with a third party script, you're leveraging the work someone else has done to do the work.
Good luck!
Peace...