This is not something you can generally do with an application on your Mac. Instead, you would typically do this from your web host's control panel. For example, on my control panel, I go to Password-Protected Directories, choose the directory I want to password-protect, then fill in the relevant information, and it does the rest.
I'm guessing you're connected to your site either by FTP (a client such as transmit or Cyberduck) or using the Control Panel, just make a .htaccess file with the required info (search google for .htaccess generator) and put it on your site.