Lots of people have had dreams that seem to foretell the future. Some psychologists attribute this to "retrieval cues."
A retrieval cue is a coincidence in the real world that triggers a dream memory which otherwise would have gone unnoticed. In other words, the real event triggered a recollection of a dream, which later seems like it must have been in your thoughts all along.
Some studies suggest we have literally hundreds of dreams each night. Coincidences are bound to come up. And if the coincidence acts as retrieval cue, the sense that you predicted something can be pretty convincing... even if it's just a dream.