It may also be possible (this is speculation) that a person on the spectrum can develop an unusually good understanding and communication ability with animals. If you have heard of Horse or dog whisperers, I can easily imagine an autistic person becoming one. I only actually met one Whisperer (Horse) and they were definitely on the spectrum.
People have called me an animal whisperer, because of how most animals behave around me. Two of the most heartwarming memories that I have: I was walking on a nature trail in Florida, with my husband. There were some semi wild horses there, and at the time I was terrified of horses. For some reason two horses started following us down the trail. There were other people there, offering bits of food to them, but they ignored those people and followed me. Apparently there was something about me that drew them, even though I felt uneasy.
The other happened at a zoo in Philadelphia. We were at an indoor exhibit, where the animals were behind a glass wall and most of them were hidden. Other people were standing around, wondering where the animals were. They finally got bored and left. When I passed by the cages, they started coming out and staring at me. I wouldn't say I was communicating with them, but I did feel a strong feeling of affection for them. I am sure many Aspies here can relate to dogs leaving their owners and running up to us! This always happens with both me and my husband (who is also on the spectrum.) The owners are always puzzled why the dogs are greeting us like long lost friends, lol. I used to be very afraid of dogs too, but learned to read their body language and it helped a lot. Like, if the tail is
slowly wagging, they are feeling friendly. If it is wagging fast, not so sure. When they look like they are "bowing" to you, they want to play.
To the OP, doing some reading about how to interpret the dog's body language can at least help allay your apprehension that they are about to harm you! I still feel nervous around dogs but my husband has taught me how to interpret their intentions.