Did Jesus know all along he was God or realize it later?

People have been debating this for centuries. I'll give you a few ideas. 

The first believers were not sure if he was simple a man, or if he was God. Even though, through the book of John he makes the claim clearly. "I and the father are one." "if you know me you know the father." and the biggie "before Abraham was I AM." gave me a chill to even write that one. 

So the debate went on until AD451 when the Christian leadership got together at chalcedon (not sure how to spell it) to discuss whether Jesus was divine or just a man. 

The outcome was basically that - "yeah he was apparently God and Man... whatever that means" 
So even though they made this claim, it was admitted by basically everyone then and since that we don't really get it. We don't really understand the hyper static union (as it's called.) 

So this raised another great question, which you are asking now. 

Was he always God, Or did he become God at some point during his life?

Basically two theories rose out of this question. 

Theory 1 - He was always God. 

Theory 2 - The essence of God was bestowed on him when he was baptized. (John the baptized mentioned a few times in the gospels that the spirit of God came down like a dove and rested on him)

Both theories are difficult. If he was always God, why did he have to learn? 
but if he was only a man until he was 32 then did he sin as a child? 

I'll tell you what I think about it. 
Scripture says he was sinless. Scripture also says that all have sinned. If he were a mere man only, then his childhood would have included sin -something that scripture claims didn't happen. 

So based on the available information, I believe that he was always of the essence and nature of God. Especially when the bible calls him "THE LAMB WHO WAS SLAIN BEFORE THE FOUNDATION OF THE WORLD". It's hard for that to be true if he were only a man until 32. 

Secondly John opens his gospel by talking about the "word" (Greek: Logos) In John's account, this Logos created all things that have been created. It then says The Logos became flesh, and made his dwelling among us. John clearly was claiming that God himself became a man.... 

How? I really don't know. There are so many mysteries. 

I think this is why the faith aspect is so important, because there are clearly going to be things that we do not understand if we plan to have a relationship with an all powerful being. 

He gave use Jesus (who called himself the Son Of God... another mystery) as evidence that he exits and loves us. Jesus came in a form that we could understand, so that we would have enough to go on when he asks us to trust him in the things we don't understand. 

The bottom line is, we don't yet have a good answer for this question. It's one that falls into the category of divine mysteries. It's kind of like Dark Matter. We've reached this conclusion based on the available data, but we haven't had a telescope that could observe dark matter... until now. We are still waiting on the gravity wave LIGO equivalent for spiritual things. If scripture is true, it leads us to some wild conclusions. If we had no evidence that Jesus was divine, then we'd shrug it off and call it fiction. However, we have evidence to believe that Jesus was trustworthy, and had the authority to make these audacious claims. 

That's why we are holding on, until we understand more. 

Paul said, it's as if we are looking through a glass dimly. In their day, glass was wavy and unpurified. Their mirrors didn't give them an accurate view of their face. However they gave them a general sense. I think this is one of those issues where it's a dim glass.