The minimal requirement GCC for homebrew is 4.9. I would like to propose to the team to also support GCC 4.8 because RHEL / CentOS 7 are still supported and quite popular in many institutions and enterprises.
GCC 4.9 is in EPEL afaik, allowing you to upgrade.
GCC 4.7 or later is new enough to build glibc 2.23, which is a hard requirement, unless you are able to install in
/home/linuxbrew/.linuxbrew, in which case you don’t need any compiler at all. Then
brew install gcc will install GCC 5, and you’re off to the races. Post the error message here if installing Homebrew is failing for you.