Our goat Josephine finally allowed me to pet her. After feeding the sheep and goats some animal crackers and watching me scritch the ram's head, she stood on the steps next to me and let me touch the top of her head. She was a bit skittish at first, especially about touching near her horns, but she got used to the idea pretty quickly. When I started scratching her between her horns, her eyes went all squinty, just like the dogs when I scritch them behind the ears. She let me pet her back, legs, belly and under her chin and just seemed to soak up the attention.
I went inside for a while, and when I went back out, she came running over and begged for more attention. It's taken a while, but my efforts have paid off.
Her sister Buttercup is much more skittish, but hopefully she'll figure out that it's safe to let me scratch behind her horns, which seems to be the Special Scritchy Spot for sheep and goats.