practice is all it takes...
u have to train ur ear to recognize the key note of the song just by listening.
when u have sum experience,playing songs
then just listen to a song whose chord u wanna find out ,
ideally select one which has sum guitar strumming.
listen to that song with ur eyes closed(this is very important,to cut out distractions).
listen to the song carefully.don't hear it listen to t.
notice the singer's voice the bass in th bckgrnd,
pay attention to the detail.
listen to the songs a couple of times till u have a frame of the song in ur mind,
notice where the singer raises his pitch or changes it.
try to figure out(feel) the chords which r accompanying the song.
just try it,it will be an hit and trial type.
listen to the song many many times
may be a hundred times,
write down ur conclusions on a paper, and check if ur chords r correct by comparing it with the ones avalible on the net.
if all r right ,u got it.
if there is a mistake listen to the song again keeping in mind the right set of chords,
after that pick another song and start over again.
when u'll practice this 4 a couple of months u'll have a gud idea how to do it.
remember in music devotion and hard work is the key to success,
practice regularily,even if it feels that ur not progresssing, don't stop.
one day u will.
try it out in a low light room or in a room with lights off,this cud seriously increase ur efficiency to listen.
if have any prob feel free to clarify it.