I saw this movie a few days ago, and have read the reviews here, and I think the naysayers here have missed the point.
Firstly, there has to be "willing suspension of disbelief." If you can't plant yourself in the universe that Gervais has created, and align it to your own "real" world, you're doomed to not like this movie. Start there and then move on...
Gervais is not telling us religion is a lie. His character created his own lie to comfort his mother in her dying moments. In much the same way that Brian in Monty Pythons Life of Bryan is mistaken as the Messiah, the main protagonist here becomes a victim of his lies, finding he has to spin an ever increasing web to keep people happy and the people are hungry for more. If you notice he becomes very reluctant to say more about "The Man in the Sky" because he doesn't like the way things have panned out from the moment in the hospital.
The moral is lying does not bring him happiness, and telling the truth does - it gets him the woman he loves. I also think in an obscure way, he is making the point that religion, in all its faiths, has become the root of a lot of problems in our society.
This is a lovely fun little film, and deserves an open mind. It appears to me that as soon as anyone introduces religion into something, viewers become remarkably blinkered to what is being told in the story. Get off your soapboxes and take another look.