gfortran installer for Mac OS X
Apple-style installers of gfortran for Mac OS X are made available for download here. To install any of them, you need to have the Apple Developer Tools installed, as well as "command line developer tools". These can be downloaded from http://developer.apple.com/ (free registration required). Click on Downloads > Developer Tools in the sidebar. Find the latest version supported on your platform: XCode 3.1.4 for Leopard, XCode 4 for Snow Leopard, XCode 4.6.3 for Lion, Xcode 5.0.1 for Mountain Lion and Mavericks.
The gfortran package for MacOS X installs all files in the /usr/local/gfortran directory, and a single symbolic link (/usr/local/bin/gfortran). If you need to uninstall it (since Apple packages do not support auto-uninstalling), you need to type the following command in a terminal, as administrator:
sudo rm -r /usr/local/gfortran /usr/local/bin/gfortran
As every time you use administrator privileges, double check your command and make no mistake!