The best gift is one that is unmistakably from you, the giver.
A gift has two purposes: First, create some happiness in the receiver. Second, recognize the relationship between you and the receiver.
If you know the person well, the first part is not hard. You know what they like - stout beer, for example - so you get them something they like.
The second part is the one that is often overlooked. At a wedding, for example, the couple gets a couple hundred gifts and cards. Point at any of those things 1 week later, and the couple would be hard-pressed to know who gave them what, without using their notes.
So the ideal gift is one that is useful to the recipient, but also has a clear reference to the connection between you two. The recipient can look at the gift at any time, and immediately know who it is from because it references a deeper connection between you two.
I played in a band that rehearsed in Lagunitas, CA. The drummer likes stout beers. So if I give him a stout beer from Lagunitas Brewing, he's going to be able to link the two things, and know immediately that particular beer (amongst the 50 craft beers in his beer fridge) is from me.
Meeting both requirements makes gift giving harder... but also easier. It narrows down the range of possible gifts, but that range gets deeper and more interesting. That makes searching for a "unique" gift easier, the more specific you get.