Does this buff work for guns and bullets, too? Does it apply to ranged weapons in general or only arrows fired from bows and repeaters?
No. Potions, buffs, and items that improve "arrow" damage only affect weapons that shoot arrows. If you use guns, you'll want to be looking for things that affect "ranged" damage.
Don't worry, though! Despite the fact that there are no potions available that buff gun damage, guns are still an incredibly powerful weapon choice, especially with complementary gear to back them up, like the Necro Armor.