As noted, automatic cannon and naval deck guns are used as anti aircraft/anti missile weapons today, and some forms of C-RAM (Counter Rocket, Artillery, Missile) weapons are essentially CWIS mounted on trucks.
Truck mounted CWIS system
This deals with incoming rocket projectiles, artillery shells and so on, which are far more difficult targets than enemy aircraft and UVA/UCAV's. You would probably expect something like that to be around enemy high value targets and installations. Gun based GBAD is still very much alive in most armies which have GBAD systems, anything from a .50 BMG mounted on an American AVENGER to Russian systems with twin 30mm cannon paired with anti aircraft missiles.
GBAD based on an MRAP chassis
Russian Tunguska-M1, armed with 4 SAMs and 2 30mm automatic cannon
Stealth aircraft, UAV and UCAV's will be particularly challenging, but if the adversary is aware that this is a threat, then they will invest heavily in sensor networks that provide as much warning as possible, as well as visual sighting and aiming of weapons as a last ditch backup. The fact that the air vehicle is armed with a laser isn't a magic wand, lasers have several limitations including heat buildup, mirror aiming, pointing, stabilization and cycling time, so a stream of high velocity cannon shells isn't going to be intercepted and shot down by the laser. Other possible counter measures include mounting the GBAD on the high features to "shoot down" at marauding aircraft flying NOE profiles, this might disadvantage the aircraft, especially if the laser is belly mounted and thus has no opportunity to fire back.
Lasers and stealth are not "magic", but simply technical solutions to some tactical problems. An adversary, especially a near peer one who is aware of the problem will work hard to develop countermeasures, ensuring a continuing dance between offence and defence.