A 2-year-old girl was injured yesterday when she was attacked by a coyote, police said. The child was walking down Clarendon Street with her 64-year-old grandmother around 11:30 a.m. when the coyote approached the child and bit her in the head, said Weymouth police Lieutenant Thomas Farrell. The grandmother, who at first thought the animal was a dog, began to scream. The coyote let go of the child and ran into a nearby yard, Farrell said. A neighbor called an ambulance, and the child was transported to South Shore hospital. She suffered a 2-inch laceration on the right side of her head. Animal control officers and Massachusetts Environmental Police searched the area, but were unable to locate the animal.