There are a number of things you can try. One of the most successful ways I've 'cured' this is to introduce a vitamin supplement to the water. Most commercially available reptile supplements include an 'appetite stimulant' - so - as long as the gecko is drinking, it will at least get some vitamins and minerals into its body.
Offer small food (crickets, meal-worms etc) BUT just a few at a time - so you can check to see if any have been eaten.