Pretty simple — just do the following:
- Open Terminal (Applications > Utilities > Terminal)
- CD to the directory with the file(s) to zip and password-protect
- Type the following and wait: “zip -e archive.zip file1 file2”
Note: I zipped my iPhoto Library, so I did “zip -re photos.zip Pictures/”. The -r means recursive.