I teach piano by ear to my students.
You first need to start with training your ear to hear inversions of chords. The best way to do that is to learn your chords first. I, ii, iii, IV, V, vi, vii(o)
Learn all your extended chords like your augmented, diminished, 7ths, major 7ths, 9ths, 11th, and 13ths.
Then learn to hear the sounds of inversions. Start low with Major and Minor 2nds, then Major/Minor 3rds, Perfect 4th, 5th, Major/Minor 6th, Major/Minor 7th.
Listen to a song and try to pick out the melody lines.
If you listen to choir music frequently and can pick out the soprano, alto, and tenor this can help you on your way to building chords by ear.
Let me know if you need any help. I have some great lesson plans.