Gargoyles originated somewhere between the 11th and the 13th Centuries. They served two purposes - to scare off evil, and to divert rainwater. Many have open mouths because they also functioned downspouts to divert rainwater from foundations. As a result, many of the early Gargoyles also had rather long necks. The word "Gargoyle" originates from the old French word "Gargouille" meaning "Throat" but which also fairly well describes the gurgling sound of water coming through the downspout.
The Catholic Church originally used Gargoyles as a visual reminder to their Pagan converts, many of whom were illiterate. They were something of a "sermon in stone", or a warning of sorts to teach the people how to behave in a non-written way. They are now pretty much ornamental and assume many different forms.
Most gargoyles are grotesque, but stone carvers in the past also honored relatives and friends by carving their faces into them. As they evolved, they morphed into often very elaborate statuary.