When I was learning to play the saxophone my instructor had an old copy of the Real Book. The transcriptions of songs by some of the jazz legends would blow my mind. I thought the people being able to transcribe those were geniuses (still do). They had no sophisticated software to help them. It was all done manually by listening to countless hours of recordings over and over again. All those chord changes, harmonies,…
I've spoken to a few professional arrangers, and I always ask "How many times did you have to listen to that to write it down?" "Just once." Genius indeed. Or 10,00 hours. Or both.
I say misfortune because I assumed this was a binary thing: you either could do it or you couldn't, and I was in the latter category. Later in life, I found that it was a learnable skill (probably what did more than anything else for me in developing my ear was being part of the cathedral choir and doing a lot of sight singing in harmony) (another aside, having done a lot of church music over the years, it was interesting to see the level of musicianship of the cathedral choir, and I was in the larger amateur group rather than the smaller professional group—where in most church choirs, each section would have their part played at the piano and they'd sing it back, the cathedral choir would have all four parts played together at the piano and everyone would sing back in harmony. The professionals didn't bother with the piano part and just sight-sang everything, including some really tricky harmonies, like having the sopranos sing a high F against an E minor chord in the lower voices.) At my peak, I was able to work on writing music while walking without any instrument and come home and transcribe what I'd written including all the harmonizations. I've lost some of that skill from lack of practice in the years since and I had to use Capo to recover the chord progression of a piece I wrote where I couldn't remember one of the chords in the middle 8.
So bottom line, there are some people for whom this comes naturally but it is absolutely a learnable skill.