Something kind of similar happened to me a few years ago (not the same tho). There was a guy who is a regular at the same gym as me. A lot of the guys who worked out on the same days/times each week used to chat a little bit in the locker room - about the weather and stuff. He was pretty socialable with quite a few of the guys and so was I. He was not in the least bit attractive to me and I never really thought about whether he was gay/straight etc (I guess I assumed straight).
After a couple of months, if I happened to be in the locker room alone with him he would ask questions I was a litle uncomfortable with: "Where do you live", "What are you doing later this evening" etc.... I would change the subject and from then on tried not to be in the locker room at the same time as him. However, sometimes it was unavoidable.
One day I had just finished my shower and was getting dressed when he came in from the gym. He got in the (open) shower. I didn't pay him much attention and finished getting dressed as quickly as I could. When I was ready to leave I had not choice but to walk past the showers to reach the exit. This means I had no choice but to look in his direction very briefly. What I saw was that he wad standing there with a full hardon. Like I said before, I was not attracted to him at all and this made me really uncomfortable. I looked away immediately and continued towards the exit.
He then shouts out to me "Excuse me!". I thought to myself "OK, if you talk to him now maybe I get a chance to tell him I'm not interested and that will put a stop to all this". So I paused and said "Yes". However, to my surprise he then said "I can't help noticing the fact that you are always looking at me and I want to say it makes me very uncomfortable". I was really shocked because this was not what I expected him to say. I had not been looking at him, I was not the one who kept asking personal questions, in fact I had been trying to avoid him. What's more, I was not the one standing there naked with a raging hard-on! The only thing I could think of to say was "I am sorry". I meant to say it in a really sarcastic manner, but I think it actually came out sounding quite sincere, which was not what I intended at all. It probably sounded like I was actually apologising for something I hadn't done.
Anyway, after that I never spoke to the guy again, although I still bump into him (not literally) from time to time.