Emacs GUI won't start when launched from the Terminal
The installation command should end with the option --with-cocoa:

brew install emacs --with-cocoa


But first execute

brew uninstall emacs


or else Homebrew will refuse to reinstall Emacs.

As an alternative to brew install emacs --with-cocoa, Homebrew recommends running

brew cask install emacs


(you get this recommendation in the end of the brew install emacs --with-cocoa run). However, I've found that this doesn't work, and ends with the following error message:


  Error: It seems there is already an App at '/Applications/Emacs.app'.




Acknowledgements

This answer is essentially copied from here.



Update as of July 23 2019: The --with-cocoa option is not supported any longer. Follow these steps.


brew uninstall emacs
rm -rf /Applications/Emacs.app/z
brew cask install emacs