Hi Champers 🙂 Its normally included with your hosting package. you can log into your control panel and set certain folders to have certain passwords, which you have complete control over.
Alternatively you can do a javascript protected page too, but this isnt as secure and on a lot of them you only need to see the source code to figure it out.
What I did though was give the buyer the URL to the passworded page so if they did see the source code it didnt matter because that page was for them anyway! They then had to enter the password and they would be taken to the photo page.
Im sure I have all the coding somewhere .. I can dig it out for you if you would like 🙂
Hugs, Cinds x