[Greetings! This is my explanation of Inception, but I bet you have a good one too! Go to MyInceptionExplanation.com and let me hear what you think.]
Okay, so Cobb was dreaming. The fact is that the entire movie was about the concept of trust. Cobb was being chased by an evil firm, just like all the other dream sequences in which the subconscious comes for the dreamer. Cobb also made use of Mal's totem, the spinning top, which only Mal knows how to use (because it is her totem), but Cobb adopted it for his own use.
I think that this is a really subtle point that one may forget about during the course of the movie, because we only see Cobb handle the totem (so we believe that the totem is his - when it is actually Mal's) and a lot of effort was put into explaining how significant it was for only the maker of the totem to ever handle it; the totem is the only way that someone in the film can know the difference between a dream and reality.
So, given that the totem actually belongs to Mal and isn't Cobb's and our experience of Cobb in the 'real world' is very similar to the types of experiences dreamers had in dream world's with the subject's subconscious, I have to believe that Cobb was dreaming.
I think that the movie is primarily about trust, specifically, the trust between Mal and Cobb. Mal and Cobb lived with one another in Limbo for 50 years and lost track of reality; what was real and what was a dream. However, even though they had both lost track of what was real or not, Cobb was somehow aware that his reality was not real.
Cobb had the idea that he was living in a dream, and he wanted Mal to wake up from it. That is why Cobb convinced Mal to commit suicide under the train.
Mal shows Cobb a great deal of trust by being willing to believe that she is living in a dream state and that the only way to wake up from this fake reality would be to commit suicide.
Imagine being in Mal's position. She believes her reality and she trusts that it is real. But, the most important person in her life, Cobb - the only person alone with her in Limbo, is telling her that it is all fake and she will need to commit suicide in order to come back to reality. Can you imagine how Mal must feel?
But, Mal trusted Cobb, and when the train ran over them in Limbo they woke again. Yet, we assume that this state that they awake into is 'reality' and we are tricked throughout the movie by Mal's totem (which Cobb uses), which spins infinitely in the dream world and falls over in reality.
When Cobb returned home, you could tell that he knew something was wrong, because he was perceiving what he was creating based on a memory (which is the definition of a dream). The house looked exactly the same and the kids were dressed the same. Even though Cobb is elated to see his children, it is at this moment that he ought to realize that he is still dreaming. Recognizing Cobb's realization, Mal makes herself know to Cobb from his subconscious by making the top spin infinitely.
If we accept the premise that Cobb is still dreaming, then Mal could still exist in his subconscious and appear in Cobb's dream (what Cobb actually perceives to be reality). However, she does not appear to him in the world that Cobb believes is 'reality' (until the ending scene) because she wants Cobb to trust her; she wants Cobb to take the 'leap of faith' that he asked of her while they were in Limbo together.
Therefore, at this point in the movie (the ending scene), Mal controls her totem once again, which only she knows how to use because it is her totem confirming that Cobb is in a dream (also based on this, we can explain the previous spinning top falls earlier in the movie - Mal is actually taking control of her totem and making it fall over to test Cobb and see if he will actually trust her by committing suicide and joining her in the next world).