The premise is a pretty interesting setup for a good comedy, and for the first part of the film it works very well. However, Gervais ruins it by using the latter half as a smug and hamfisted anti-religion spiel.
This would have been much funnier had Gervais left all the ideas about religion alone. The visuals about Christianity were also a bit offensive. It was very funny, though. Ricky Gervais is nothing if not a master of comedy.