The churchyard grim is the spirit of a dog buried in a cemetery meant to protect spirits of the recently deceased (and occasionally living visitors) from evil spirits.
The background is based on some photos I took in Bonaventure Cemetery, which is known for being home to a pack of “hellhounds”, though in reality the barks and howls come from some corporeal hounds that live near the cemetery.