Here is compiled a list of good ideas ranging in function and price.
The big gifts:
First thing I'll say is that guitarists are more often than not extremely particular about what they want, and for good reason, so if you want to go all out and get them a guitar, amplifier, or even pedals, it's best to come clean with them and just get something you know they want, or at the least seek out very good counsel from their musician friends.
For everything else, here is a great guide to what will work:
Under $50
Portable Practice Tool Kit
Perfect for anyone - especially those who wish they had more time to practice but have to travel a lot or have long commutes.
Guitar Cleaning Kit
Essential for every guitarist and the good thing is that if they already have one, they can put it aside and use it when they run out. Or there may be some new cleaning tool they find useful.
Capo
Capos are a fairly standard must have for a guitarist, but if you want to get them a nice one, I'd recommend the Shubb. There are many brands that will do the trick but the most important thing here is that the tension is adjustable and it's easy to use.
Micro Amp
Perfect if the guitarist in your life is keeping you awake but insists they need some sort of amplified sound. Great for quiet but more authentic practice. There are other brands for this which are great (Vox, Fender etc.) but this one is great.
Guitar Strings
You may think this is a boring gift but as a guitarist I'm not against that at all. I am for something I know I will use and will save me money through the year. A simple raid of their case or gig bag should tell you what brand and gauge they like. Be exact if possible.
Guitar Player Subscription
Guitar Player - a well loved magazine in the guitar world has an amazing deal at the moment of 24 months subscription for about $23 (plus postage). A great buy.
iTunes Cards
These guys will never go astray
Picks
These won't hold up as a stand alone present, but will always make nice topping with whatever you get
Slide
Again, these won't hold up as a present on their own but make a great addition for any guitarist always looking to add new skills, or just interested in slide guitar. There are a few different types but since these are pretty cheap, just pick one, it will either be perfect or help them see that they are more keen on a brass or glass slide instead etc. Finger size will matter, however.
Songbooks
These can be very useful and inspiring. If you know an artist they love, get them a book with their songs written out so they can learn it.
iPad Mic Clip
Perfect for a guitar vocalist, especially one doing long weddings or pub gigs.
Guitar Wall Hanger
Great for those who have limited space, like to show off their axe, or who really struggle with the obstacle of actually getting their guitar out of the case to practice.
Guitar Cables
If they are just using some rubbish cables that they could afford at the time, this may be a great idea to get some high quality cables that they can use for years to come. I'm recommending the Mogami Gold here, though there are many great ones to choose from, including Spectraflex, Planet Waves American Stage and Monsters.
Guitar Triller
If your guitarist is into trying and learning new tricks, then this one should be pretty fun as they can hammer away some ultra fast trills.
Guitar Strap
A good guitar strap from a loved one is always nice. I'm not going to throw in any recommendations here because it's really about taste (in which the giver's taste is also very valid). Just wanted to get the idea there
Pick Holder
It's always worth throwing in one of these on top for good measure - very cheap too
$50 and Beyooooooooond
Focusrite Scarlett 2i2 - Audio Interface
Recording is an essential part of a modern guitarist's skillset. With that you need an audio interface. While there are a few on the market, this is my recommendation for something simple, reliable and widely regarded. Can pick one up for around $100 or slightly above.
IK Multimedia iRig Pro instrument/microphone interface with MIDI for iOS and Mac
So much can be done for your guitar now through an iPhone or an iPad nowadays, this is the way to unlock all of that. A bit over $100
Ebow
Guitarists love to experiment with cool tricks that give them cool sounds, an Ebola is a sweet addition to a guitarist's bag of tricks. Perfect for all the atmospherics. Around the $100 mark.
Recording Microphone
To go along perfectly with that home studio set up. You're unlikely to get away with something decent for much under $200 but can get something of good quality between the 200-500 range (and then they can go well up from there). So yes, this is in the more expensive department and the recommendations I'm putting here are for the lower end of the good quality range.
USB Microphones: