Williams stepped in during the fifth frame of the first-round match between Jack Lisowski and Kyren Wilson when the latter was disturbed by the barbed insect at the table.
Williams grabbed the winged intruder with his gloved hand, but was stung immediately and received medical assistance at the end of the frame.
Wilson offered the official a hug after the incident, and went on to win the frame to lead his opponent 3-2 in the best-of-11 match.
“Poor Ben,” said Wilson, who triumphed 6-2 to progress to the quarter-finals.
“Firstly, thank you very much to Ben. I don’t know what he was expecting putting a bee in his hand, it was only going to go one way.”
Williams said his hand was “pulsating” for the next couple of frames, but confirmed it was fine and thanked those who gave him medical assistance.
“The wasp landed on the cushion right where Kyren was about to play so I had to get rid of it,” he said.
“I picked it up and thought ‘If it stings me it won’t get through my gloves.’ But then I felt the sting on my palm which was a shock and very painful.
“I’ve never been stung by a wasp before – the only thing I can remember which was more painful was being bitten by a dog.
“From now on I’ll be swatting them with the back of my hand rather than trying to pick them up!”