As already stated, at 5 he's hardly a baby so stop referring to him that way. He was obviously a bad mannered foal who was allowed to mature into a bad mannered adult horse.
Slapping him only means it's a game to him. He bites, you slap, and he comes back in to bite you again.
He needs to know that it's not acceptable, and for that you're going to need to physically correct him, not give him a half hearted slap and a squealing, 'Oooh, stop that!'
Some people carry tacks in between their fingers so when a horse comes in to bite, they get the tacks instead. I'm not advocating that, but I've heard it can be very effective.
Your body language and voice are also going to play a big part. You can't cringe or squeal; you have to be forceful and very confident.