Apple used to claim that you didn't need security software if you owned a Mac. However, as more people used these machines, it become profitable for people to try and hack them. Now you need security software, and as such Apple themselves have engineered a few software bits to keep you protected. In truth, their Gatekeeper has a massive flaw that allows pretty much anyone to run any program on your computer they so choose - all with a simple exploit. Ouch. Apparently, Gatekeeper is about as secure as Microsoft Security Essentials.
Gatekeeper's sole function is to check the digital certificate of a downloaded app before it's installed to see if it's signed by an Apple-recognized developer or originated from the official Apple App Store. It was never set up to prevent apps already trusted by OS X from running in unintended or malicious ways, as the proof-of-concept exploit he developed does.