How to rename formula installed via Homebrew?
I don't think what you want can be done directly without hacking Homebrew formulas, er, I mean formulae.

What I do is put

export CC=gcc-4.9


in my shell profile.  That works in almost all scenarios I'm interested in.

An alternative is that you create your own "bin" directory, say ~/bin/, put that first in the path, and symlink ~/bin/gcc to /usr/local/bin/gcc-4.9.

Both of these methods will survive package upgrades.