Bran is actually R'hllor, the Lord of Light. Sounds pretty crazy, right? Well it actually makes some sense.
The Night King, at least to the Red Priests, is considered the embodiment of the "Great Other", who is the anti-thesis of the Lord of Light. Everything that Melisandre was doing was said to be at the behest of the Lord of Light, and was done to stop the Night King, as she before most knew of his coming and that her ultimate purpose was to help stop him. The Night King showed how much power he held in line with the "Great Other" as he was able to raise the dead to be dark thralls (much like the Lord of Light brings the dead back to life) and has power over frost and storms.
How does this tie in with Bran? For one, the Night King did seems awfully obsessed with hunting Bran down. If the Night King is the embodiment of the "Great Other" then Bran may be the embodiment of the Lord of Light (GRR said that if one has a physical embodiment, then likely the other one does too), and thus by the nature of their existence they have to fight each other. Bran has shown that he can see through and even INFLUENCE time. Ned Stark heard his voice back at the Tower of Joy, and later on him appearing before Hodor allowed Hodor to see the vision of his death, which lead to his mind being broken.
Why is that important? Well, the Red Priests, including Melisandre, get their visions by supposedly staring into the flames. However, is the flame itself what gives them the visions of the future, or could it be Bran choosing a "safer" way to show others the future so that they may do things he desires? The Lord of Light did heavily misdirect Melisandre when it came to Stannis and his overarching importance, but what if all of that was just Bran making sure that Stannis filled his role? He needed him to carry out some important moments, and he likely wouldn't have done that without Melisandre there to keep him locked onto some great prophecy. In other words R'hllor lied to her, to serve a greater purpose she didn't understand at the time.
It does seem a bit odd in hindsight that a low-key assassin would be using a very rare metal for his dagger when he attempted to kill Bran in season one. Arya then goes off to become a master assassin with small weapons. Bran give her the same dagger as she returns home. Later, both Beric and Melisandre turn out to be very important to keeping Arya alive, and then finally she uses the same dagger to kill the Night King while Bran uses himself as bait. Everything lead up to that moment.
The only final thing to question, is what about all that fire magic? Raising the dead from far away and through time and space? How would Bran be doing all that? We do see the Children of the Forest using fire magic, but we don't know specifics on if that falls under his domain. Remember though, that Bran as of this moment can see outside of time, past, present, and future. For all we know later on, something gives him these powers as he full matures into it, and he knows it, and can use it in the past, but as of his present self, he does not have them, but as he will have them someday we still see his machinations play out all the same. His present self is only just now finally syncing up with his future self, and that is why he is losing his humanity more and more each episode as he ultimately accends to become like a god.