Yes, time and a desire to be able to do it.
Here's an interesting site:
http://www.good-ear.com/servlet/EarTrainer
Click the 'Chords', then 'Cadences' ... there are a few there to try your ear out on. There's a lot of other good ear training stuff there too.
It actually gets irritating when you can do it ... you listen to the
radio or TV, any piece of music, and part of your brain is tracking the changes. It takes away a little of the magical mystery of listening to music. You also begin to realize how most music follows well worn progressions ... those 7 related chords and the way the minors can be 'majorized' and vice versa, takes care of just about every tune you've ever heard.