The grapple gun is a staple of the action movie genre: simply point the hook skywards, fire and have the gun lift you onto the roof of your local Abandoned Warehouse™ or Deserted Chemical Plant™. The Batman is particularly fond of the Grapple Gun, making it a staple of his famous Utility Belt.
So let's look at the physics:
Assuming The Batman is a well-built adult male and that he's wearing a substantial amount of body armour and equipment, a mass of 150kg is probably reasonable. Raising a 150kg weight to the top of a ten storey (30m) building requires about 45,000 joules of energy (45 kJ). If The Batman takes thirty seconds to do the journey then that is equivalent to a power of 1500 W. A motor capable of lifting The Batman's 150 kg weight is probably about 75% efficient, meaning the motor has to develop about 2000 W.
If we assume that the grapple gun's motor is no more than 5 kg in mass (for ease of wielding) that gives a power-to-weight ratio* of 400 W/kg. This is within the capabilities of modern electric motors, but only just. Finding a battery that can provide 45 kJ is not difficult; lithium ion batteries can provide about 600 kJ per kilogram. However, they can't supply that electricity quickly enough, managing only about 300 W/kg which means that the Grapple Gun's 5 kg motor is going to come with a substantial 5kg battery to match. Then there's the weight of the gun itself and the super-strong cable to consider ...
Whilst devices for firing grappling hooks do exist (I'm told the Battelle Tactical Air Initiated Launch system is good) and powerful electric motors are fairly common, merging the two to create a useful handheld device is beyond the capabilities of physics at the moment. A real grapple gun would be far too bulky, heavy and unwieldy to be of any practical use.
* Of course this should really be power-to-mass ratio, but I'm going to stick with the more commonly used term.