I think the best option is to tell him honestly that you hurt his feelings when he said that because you're gay. Maybe it'll help him realize gay people are just people. Or you'll lose a friend. But is a guy that'll reject you based on your sexuality really someone you want as a friend?

I would tell him you don't like him like that though. Make it clear. That would clearly cause any attempt to soften him homosexuality to backfire.