Azalea Gym is a Bug-typed gym. Rock-, Fire-, Flying-types pokemons and moves are effective.
There are mainly three bosses: Metapod, Ariados (lvl 42), and Scyther (lvl 40). Metapod has high Defense, Ariados has high HP and Scyther has high Attack and Speed. Metapod enters the battlefield first from top left, using Harden as it goes further, thus killing it fast really helps. Ariados entering from bottom right uses Bug Bite, so equipped items cannot function. Scyther would fly quickly along the track and uses Fury Cutter on your pokemon. So, you should also kill Scyther as soon as possible since Fury Cutter powers up with hits. Also there are swamps of Spinarak.
A good strategy is to use multiple-target moves like Rock Slide, Flamethrower and Flame Burst. This kills a lot of Spinaraks and you can focus on the bosses. Powerful moves like AncientPower and Rock Blast are also helpful in dealing great damage on bosses, especially Scyther (which has 4x multiplier by rock moves). Since Ariados is also poison-typed, psychic- and ground-typed moves are effective.
Switching certain pokemons to "Fastest" mode can target the bosses.
If you don't have the pokemons above, you can also have: