I use a curved hemostat and pry upwards on the bottom of the needle hub. One of those curved (90º) needle nosed pliers should work well, also. Before removing the needle gently lift it over the peg stop (if it's one with one) and mark the "at rest" position with a little triangle piece of tape. Makes replacement easier to the position you want. I also put some blue painter's tape on the face where I'm levering against so it doesn't get scuffed. Work in an area where it's easy to retrieve a "flying" needle.

When replacing I'd advise to just press it on with finger pressure as they stay on quite tightly and you will want to remove it again, perhaps, for calibration. I've had to take the needles off a lot to get a fuel gauge and a converted econo-to-boost gauge just right.