I had this problem at Sapphire. I walked out of the hotel and the door locked and the fence/gate to the pool was locked too. I was like a farm animal stuck in it's pen. My CBBR key didn't work at Sapphire so I had to actually call the front desk in order to get myself out of that situation.
Crazy, I know.
At Portofino, in a similar situation, i discovered you can just reach over the gate and pull the handle from the other side and open it. That was super silly.