bradgrafelman is correct in that apache is probably the quickest, easiest way to accomplish this. Apache can allow or deny access to any request to a particular folder. In practice, you would probably accomplish this by creating an .htaccess file, but that would depend on how your server is configured.
Another way to control access to particular files would be to create a folder outside the web root (i.e., your public_html directory) and then write a PHP script which authenticates users and, if they pass muster, then do a [man]readfile[/man] or something to cough up the protected file.