That's happened to me before as well. It was a lab that scared me and I'll never forget the experience. I wouldn't be surprised if there wasn't something wrong with the dog.

Usually the best thing to do is stand still like a tree and don't make any eye contact of any sort, but make sure you still have the dog in your feild of vision. Dogs have a natural prey drive regardless of their breed and will almost always chase. Usually if you stay still and make no eye contact the dog will go on and leave you be. Sometimes you can slowly walk away, too.

I remember when we were looking for acreage in the country. I had gone out to look at a property by myself and I had to park and walk across the unpaved easment of another property to get to the piece of land that was for sale. As I did so I was slowly surrounded by 11 large dogs of varying breeds. Now, the normal person would have been scared $*&%less, but not me. I talked to the dogs as I walked around looking at the land. I didn't get a bad feeling at all, though I'll admit when I looked up and saw how many there were I was momentarily unnerved. There had just been 3 a moment before! Then owner came out and called them all back to their pens.