The interesting thing that is not obvious to the general public (it certainly wasn't to me when I started) is that unless there is a medical condition that is extremel rare called cogential amusia, you can develop the skill. It's not easy, and some people definitely have more natural ability but it's learnable. You likely don't have amusia, as people that do have it have a hard time recognizing an instrumental section of a song. If you can recognize 'happy birthday' by someone humming the melody, you don't have it.