What's the simplest way to password protect a text file?
You can put the file into an encrypted disk image.


Open "/Applications/Utilities/Disk Utility"
File > New > New Blank Image...
In the new image dialog make sure to choose:


Encryption = 128 or 256-bit AES
Image Format = read/write disk image

Because you chose encryption, you will be prompted to set a password for the disk image


You now have a password-protected disk image that you can save any kind of file in.