Password Protected page not asking for a password

The answer to this question was simply that the built-in password protection does not apply if you are using a custom template that doesn’t include the_loop(). Lesson learnt.