Part of it has to do with learning how to play through changes/common progressions. Once you learn how to flow through a 3-6-2-5-1 (for instance) in every key, when you hear that progression you don't have to think much about what notes to play. Then you can focus on feel, tempo, placement....etc.
A 2-5-1 is a 2-5-1 regardless of what song it is being played in. Of course, different styles of music have different "important" notes. The first thing I would suggest is to learn to hear common progressions. Then learn how to play through them (in as many different ways/styles as you can).