I can't remember, but I think I've faced against only one or two Gnar's top. Regardless, here's what I suggest.
If you can reliably land Q, max it first. Otherwise, W is better. This is just general rule. I'd try to get as much cs in the early levels when he can't do a whole lot to you and learn to effectively dodge his boomerang. Walking perpendicular to Gnar will make it much easier to dodge his skillshot (true for any champ really).
If he tries jumping onto you, immediately Q on yourself, W him, and walk away, then continue farming (since you said you did poorly in extended trades). Don't try harassing him with Q unless you're doing well and are at sustainable levels with your farm. Save your abilities for disengage and return harass.
If you farm and hit most cs, you should be at sustainable levels of health. If not, try looking at runes and masteries and making sure you have more tankiness (e.g. armor seals and masteries in the 2nd page). Let him push only a little bit into the lane, and then start aa more and use abilities if necessary, since farming under tower makes things trickier.
This is also more in regards to item builds, but I noticed in the game against Gnar you built a RoA. I suggest building Trinity Force instead as your first item by getting Sheen on your first back. This is because RoA gives some extraneous stats. You'll have more mana than you need and your ultimate already gives you a whole bunch of bonus health, so getting resistances is usually better anyway. Trinity force really gives you good utility and lets you stick to targets faster. Followed by a Rylai's if you're doing well (your E will constantly proc it), they can't get away from you. From there I usually like to build tanky items (Randuins, Frozen Heart, Spirit Visage, etc.).