I heard a quote by Tom Dorrance once, when someone asked him what to do about a horse that bites. "Do your best to stay out of his mouth until you can get control of his feet". Couple of other things, if he's been fed by hand don't do that anymore. If he hasn't been, don't start. It is possible to teach a horse to be fed by hand and be respectful too, but that line is just too fine for most people to ride if that makes sense? The way that I personally deal with a horse that already bites is this though: I see it coming a mile away, and when they try to bite I'm just not there. If I'm in close they might find my elbow halfway in-between where they thought they were trying to go with their teeth. Now, in order to do that you need to know where to stand and how and when to move, but that's exactly what I do. I make myself impossible to bite - but I DON'T get into a confrontation over it or play retaliation games with the horse as this actually fuels the fire thus having the opposite of the intended effect!
I know that's a lot of ideas that may be difficult to remember when you're actually in the moment, but the take-home message is basically this: Your correction is in the feet. Cause those feet to move and he won't even think of biting. If he's a dangerous horse to be close to, find someplace like a round pen or something similar to where you can move those feet from a safe distance but MOVE THOSE FEET! It can be fast or it can be slow, it can be one foot at a time or a gallop just so long as those feet move.
Just be careful not to get kicked too!