While you can get a gun from the gunslinger class for free, you can get a better gun from the Wizard class or Battle Host Occultist Archetype for free, and then multiclass thereafter. For characters looking to make use of the ridiculously expensive but entirely nonmagical firearms in the Technology Guide, this is the way to go.
Wizards who select a bonded object begin play with one at no cost. Objects that are the subject of an arcane bond must fall into one of the following categories: amulet, ring, staff, wand, or weapon. These objects are always masterwork quality.
...
A wizard can add additional magic abilities to his bonded object as if he had the required Item Creation Feats if he meets the level prerequisites of the feat. For example, a wizard with a bonded dagger must be at least 5th level to add magic abilities to the dagger (see Craft Magic Arms and Armor feat) ... The magic properties of a bonded object, including any magic abilities added to the object, only function for the wizard who owns it.
and/or
At 1st level, a battle host forms a supernatural bond with a specific weapon, suit of armor, or shield. This selection is permanent and can never be changed. The bonded item is masterwork quality and the battle host begins play with it at no cost.
The bonded item is immune to the broken condition for as long as the battle host lives. If a battle host dies and is restored to life, the bonded item is also restored if it was destroyed. Any magic powers associated with a battle host’s bonded item function only for the battle host; in the hands of anyone else it is only a masterwork item.
(note that this ability, unlike the Wizard's, allows you to choose a weapon or armor made of a special material or materials)
Furthermore, while the gunslinger class has access to some interesting or useful features (Gun Training, Some Dares, Some Deeds), it's often a fairly weak class for a firearm-based ranged combatant. Rather than multiclassing into Gunslinger from Wizard you might want to pick a class around the specific combat style you're looking for (e.g. Wizard for a sniper, Paladin for a kick-in-the-door machine gunner, or Ranger for a dual-pistols style character) and multiclass into that instead. You'll have to spend a feat or archetype on Exotic Weapon Proficiency(firearms), but you'll get better stuff overall, usually.