Hmm. Could many things. Could be that Itachi somehow imparted his consciousness into Naruto before falling victim to Sasuke. Like basically, Itachi knew he'd have to let Sasuke kill him, so before dying, he used Naruto as a vessel to carry on his will. Like some kind of a genjutsu message that knows the truth, that's a popular theory (for people who want Sasuke be saved).
Could be some sort of revival technique (like if Naruto dies, or something). It could be a lot of things.