First you should have homebrew installed on your mac. How to install homebrew
Before installing gnuplot, you should install Aqua first. Go here to download the AquaTerm-1.1.1.dmg then install it.
If you have ever installed gnuplot before, please uninstall it first.
$ brew uninstall gnuplot
$ brew update && brew upgrade