There was a threat against a bus driver by a man ‘who appeared to be wielding a gun’, a union has said.