Nikodemos
Member
It was according to R'hllor's plan, at least apparently as Melissandre sees it. The Lord of Light caused Stannis to omit ordering a door guard, and made Davos free Gendry, since the boy was no longer needed for the Grand Plan (not now anyway, not in the way it was supposed to), but omens take a time to be interpreted, and by that time Gendry would be dead. Remember that the Red God is portrayed by his followers as all-seeing.I don't understand why Stannis didn't have a guard or something at Gendry's cell. Obviously he knew Davos had feelings towards the boy.
She threw the message into the fire to confirm its veridity, and that's when she realised all this.