During the weirwood attack, Bran and the Three-Eyed Raven go back to a day from his father's past -- 97% downloaded! -- and there's not enough time. The White Walkers are closing in and Meera has to get Bran out of there. Her cries ripple through space and reach the greensighting Bran, who deviates from the plan and wargs inside Hodor during time travel. Back in the present, Meera screams, "Hold the door" to a warged-out Hodor as she flees with Bran. When the superpowered kid finally unplugs from his friend's brain, it's too late -- the past Hodor is fried, creating a paradoxical butterfly event. Bran created the timeline in which he already exists.
This lends credence to a few theories. One, Bran can legitimately time-travel. Though Weiss and Benioff refer to the greensight scenes as "visions," they are something more, able to be impacted, closer to real time-travel than, say, Harry Potter's Pensieve flashbacks. The twist could mean anything for Bran's destiny on Game of Thrones. Two, Bran's colossal screwup could also hint at what the Three-Eyed Raven did wrong back in his day. There's a running theory that the Three-Eyed Raven whispered into Aerys II Targaryen's ear eons ago, convinced the royal brute he was hearing things, and made the Mad King the Mad King. The Hodor warging episode doesn't work in exactly the same way, but "The Door" leaves the door open.