My method: I'm paying attention during the year what my relatives and friends are excited about, what they want and/or plan to buy and take a note. Once a birthday, Christmas or another opportunity comes, I only have to pick an idea from the list and actually buy it. Works perfectly. Telling them that you remember that they mentioned it is usually also great. I think it subtly communicates that you care enough about them to pay attention.
This reveals the joy of gift-giving. I had always shied away from trying hard to find a great gift. I was afraid I would give a terrible, terrible gift (I'm not great at receiving gifts). Someone I dated years ago had a talk with me about the joy of giving gifts and I've worked on improving. It's actually a lot of fun. A little listening and preparation turns you into a thoughtful gift giver.
I also find it quite satisfying to sneak around and ask family or friends about what we should get so-and-so. It doesn't always work out well but people appreciate you trying and sometimes you really nail it.