What is Gerald of Wales' religious background?

He was Archdeacon of Brecknock, and was elected Bishop of St. David's but never managed to take up the post.