The Gunners captain was pictured at the hotel on Tuesday evening, just 24 hours before Barca took on Chelsea in the Champions League.
His presence had sparked speculation over a potential move to the Nou Camp in the summer.
However, the striker has insisted that he has "nothing to hide".
"The explanation is really very simple. My very good friend Ibrahim Afellay plays for Barcelona," the Dutchman wrote in Arsenal's official matchday programme. "This was an opportunity for me to go and visit a close friend, show him my support and catch up.
"Unfortunately, this had to be at the hotel, because he was not permitted to leave it.
"I was wearing my Arsenal tracksuit and we sat down by the reception to have a chat and some food - everyone could see us and there was nothing to hide. I can't imagine anyone conducting transfer negotiations in these circumstances."
The 28-year-old joined Arsenal in 2004.