A gallery can either be restricted by adding a password or it can be a public gallery. When a gallery is public, anyone with the URL for the gallery can view it. When the gallery access is restricted, only the client that has the password can access the gallery.
To restrict access to a gallery, go to the "Availability" section of the gallery settings.
Once you've restricted access to a gallery, it will be locked down to only clients with access to the password.