There are a lot of ways to do this.
One quite neat way would involve password protected folders from your web host. Sounds complicated, it's normally dead easy.
You should have a web hosting control panel somewhere with your hosts and that should contain the option to protect a folder.
Then you just bung your gallery page within that folder and bish bash bosh.