The more your horse experiences these things, the easier it gets, but..some horses do have their special set of "monsters" that they never feel comfortable with.
If you feel unsafe, dismounting is indeed the smart thing to do...there is nothing more dangerous that a truly scared horse.
I ride on the road and through parking lots, etc. a lot and while you're de-sensitizing, work with as many different "monsters" as you can. I've found that even slight variations of 'vehicles' can affect a horse very differently....strollers, skateboards, shopping carts, little red wagons, etc, etc.
Luckily, around here, motorcycle riders have actually been the most courteous of all the vehicles I've encountered. They will always slow down and ride very cautiously while around the horses.
Good luck and be safe. Some horses actually enjoy some of these things after a while...our mare, Lady, decided to 'adopt' a pack of bicycle riders one day, and trotted along in the pack with her 'herd'