Install the latest Xcode from the Mac App Store.
Go to Xcode » Preferences » Downloads » Command Line Tools » Install.
If you don't want to download/install Xcode, you can always just download Command Line Tools for Mountain Lion from Developer Downloads.