Firearms are Martial Ranged Weapons
The table on DMG, Page 267, shows that the firearms are Martial Ranged Weapons. See also the Hand Crossbow and the Long Bow: Martial Ranged Weapons. (PHB, p. 149).
To use them with proficiency bonus requires being proficient with
martial weapons. If you apply the normal rules for weapons in the
PHB, you can use them but not apply the proficiency bonus.
Proficiency with a weapon allows you to add your proficiency bonus to
the attack roll for any attack you make with that weapon. If you make
an attack roll using a weapon with which you lack proficiency, you do
not add your proficiency bonus to the attack roll. (Basic Rules p. 47)
How do I get firearms proficiency?
Downtime or feats:
- DMG page 266 recommends that one option is to use down time
activity, like getting a tool or a language proficiency (PHB p.
187) to get proficiency with firearms.
- There is also the Weapons Master feat (PHB, p.170) which may be
applicable to this weapon type. Work with your DM.
It's an optional rule, work with your DM
Firearms in D&D 5e are optional rules from the DM Guide; anything your table comes up with needs to be worked out with your DM. Your DM could decide that if you spend the down time and money to get proficiency, per the DMG recommendation, that will suffice. That would be similar to the feat, or how a Rogue gets Hand Crossbow and Rapier proficiency but not the general martial weapons proficiency.
Is proficiency with Firearms required? That's a DM call
DMG page 266 leaves it up to the DM to require, or not require, firearms proficiency to use firearms.
What one of my DM's did
If we were not proficient, we attacked with disadvantage when using firearms (muzzle Loaders). That's the only campaign I saw these in. It didn't last all that long, so none of us ever got proficient using down time.
Work with your DM to see if you need proficiency on both.
Bottom Line: No, there isn't an official ruling. This is a DM optional rule, per the DMG.
Is the table using Unearthed Arcana?
While this goes back to "your DM's call" there is some other material to refer to. The artificer (Version 2, 2019) has an optional rule for firearms proficiency for an Artificer:
If your Dungeon Master uses the rules on firearms in the Dungeon Master’s Guide (p. 267) and your artificer has been exposed to the operation of such weapons, your artificer is proficient with them.
There was a much earlier Unearthed Arcana (Modern Magic, 2015) that includes a reference to firearms; if you are using that UA then firearms proficiency should follow that play test material. For example, the City Domain cleric gains "proficiency with sidearms and proficiency with vehicles(land)". (page 1). The Pact of the Blade "Arcane Gunslinger" (p. 3) Eldritch Invocation lets the Warlock create a pact weapon that is a sidearm or a long arm as a pact weapon. Warlocks, pact of the blade, are proficient with pact weapons. The Technomancy Wizard school is proficient with sidearms. (p. 3). (https://media.wizards.com/2015/downloads/dnd/UA_ModernMagic.pdf)
Now that Eberron: Rising From the Last War is published:
"If your Dungeon Master uses the rules on firearms in chapter 9 of the
Dungeon Master's Guide and your artificer has been exposed to the
operation of such weapons." (p. 54)
Only one of the three artificer archetypes gets access to martial weapons, so it's possible to be proficient with firearms but not with other martial weapons.
(Thank you @Rykara for the assistance with the update)