Irelia does quite well in this matchup, honestly. Irelia's base damages really hurt Gnar considering how squishy his mini form is and her BladeSurge allows her to easily stick onto him when fighting. In addition, Irelia excels are farming against ranged champions due to her Q and innate sustain.
Basically, when you fight Gnar you Q to a low health minion for the reset, started attacking him and Q him when he jumps away, E him, and auto him more. When Gnar is approaching his transformation, you back off and wait for him to switch back.
I find that Maokai and Dr. Mundo are other good options. Maokai has some innate sustain, gets pretty tanky, and sets up easy ganks for his jungler when Maokai is squishy. Mundo has a lot of innate sustain from his passive and ultimate and his Cleavers easily allow him to farm from range without issue. Both champions can outscale Gnar if they go even, so they work well.