I did work on ear training in college but for me it really came from playing and transcribing as much as I could.

Many songs are in more than one key....
Yes I actively worked on ear training in my early years of playing! Something I feel is super importent to becoming a good player. Glad I spent the time now, because it has made it so much easier to play well with others and learn songs on my own. Probably took a couple years of training my ear as well as learning theory to get to the point where I could nail any song I heard quickly.
It sounds like this thread might need some clarity as to what it means to "hear the key a song is in". I'm picturing a song comes on the radio, you're driving the car, and you say, "It's in A flat". I can't do that. If it's just figuring out a song by ear, I can usually do that.
This is basically me.I have been playing for close to 20 years and still have no idea. I don't know theory or scales, so that might be why.