Interesting subject.
I notice that some people are more intuitive than others, and they pick up patterns that lead them to anticipate events. Other people seem to be constantly unaware, and are always caught off guard. While I would not say that it could not be learned to some degree, I'm inclined to say that this intuition is innate. People who pick up on things are getting better at it because they're always doing it. People who rarely do so will get better at a much slower rate.
I can think of quite a few instances in my life where I had a strong sense that something was going to happen before it did. At the time, I could not tell you how I knew what I did, but the thought was still very clear. Looking back, I can identify clues that I must have picked up on that even without realizing it, I was able to piece together a predictable outcome. It's like my subconscious got it, even though my conscious mind didn't realize until afterward.
We are constantly discerning inputs from our environment. Somehow we have to decide which of our sensory inputs deserve our attention and which does not. Sometimes it's something obvious like a threatening sound, or seeing something moving toward us. Other times, it's more subtle, like a pattern that changed somewhat, and gave us a clue that something was up. It's these subtle inputs, and the way we process them, that seems so mysterious.