Maybe not "dying", but definitely close to old age. Almost 40 years ago I graduated from Oregon Institute of Technology with a 2-year degree in Gunsmthing.
At that time, making a living as a 'smith was tough unless you went to work for someone else or had deep pockets to see you through a few years of lean times while you got a clientele built up. The AR and AK designs were still new, but it didn't take a rocket scientist to figure out how easy it was to work on one of these new designs.
In order to graduate, we had to build our own rifle from either a military or commercial action; cut, contour, thread, chamber & headspace the barrel; finish the metalwork; and inlet either a semi-finished stock or fully carve & inlet a blank; mount a scope or sights; etc., etc., etc.. In those days, a nice Remington or Winchester could be bought over the counter for much less than a gunsmith would changer for building a custom & military surplus rifles were beginning to increase in collector value. The days of customizing cheap bring-backs or surplus were coming to a close.
Today, anybody with basic machining skills can build a "black" rifle from parts & most shops will follow the automotive industry's practice of just replacing parts until it it s fixed for most production arms. The cost of labor has done more to drive this trend, I believe, than anything else.
In my musings, I have asked myself the same question - and answered in this manner: Stoner's design of locking the bolt head into the barrel completely changed the ballgame in that now, chambering and headspacing were no longer a craftsman's task. Modern production techniques improved the tolerance envelope to the point where parts are truly interchangeable. Anybody who has worked on an M1 Garand, bolt action Mauser, Lee-Enfield, etc., and an AR variant will agree that with the change in design and production methodology came a new era in craftsmanship. Now, a "gunsmith" takes a plane jane M4 carbine, hangs a bunch of accessories on the rails & calls it a "Custom Rifle".
As far as pistols & revolvers go, the polymer frame pretty much did away with any opportunity for modification by non-factory personnel. Good revolvers are either in the hands of collectors who know how to work on them, or tucked away in somebody's safe collecting dust because the owners don't want to break them. I would guess that revolver work is the closest today to what gunsmithing was 50 or 75 years ago as function and design haven't changed over the years. Many of us do our own work, having learned either by trial & error or by watching videos on youtube.
Liability has become such a large issue that many smiths don't want the trouble or can't afford the added insurance. After earning the gunsmithing degree, I returned to OIT & earned a 4-year Engineering degree which basically fed, sheltered & clothed my family for the next 35 years. Along the way, another Engineering and an MBA degree saw me to the close of my working years. For the last 15, I was intimately familiar with the F-22 Raptor airframe design and production. Now I have time to learn the infinite nuances of real gunsmithing. LOL
A couple of the guys I went to school with stuck with it & are still in the gun business that I know of - One of them is recognized as the GURU of .22 ammo in the industry & was one of the designers of the SPEER Gold Dot ammo family. Everybody else went to work in other industries where they could count on a steady paycheck. Ok, I have vented enough......