Contact the airline. EU hand luggage regulations don't say anything about such items, but various airlines have slightly different rules and will be able to advise you. (And for clarity, you're more likely to be able to take it in hand luggage than checked baggage, with airlines understandably reluctant to put heat-generating items in the hold.)
Most airline rules don't specifically mention heat guns, but many explicitly mention soldering irons. Both come under the category of "heat-producing articles". British Airways and Emirates say "needs approval"/"contact us". Easyjet says "Heat producing articles, i.e. battery-operated equipment such as underwater torches and soldering equipment which, generate extreme heat and can cause fire, may be carried in carry-on baggage only. The heat producing component, or the energy source, must be removed to prevent unintentional functioning during transport."
Note: CAA regulations (in the UK) and other sources (Good Housekeeping, Skyscanner) seem clear that you can carry a hair dryer, hair straighteners, and similar items that can get hot, but nobody says they have to be consistent.