It is produced by a Yaobikuni who has lived in the human world for so long, alongside of humans but everytime she sees them die because she doesn't age. She searches for a human to live with her forever, but they die, so the mermaid cries tears of blood creating the crimson pearl.
After Kimihiro Watanuki gave the pearl to Jorougumo to complete her request, she said that this Yaobikuni would probably not be able to make crimson pearls anymore because she wasn't ever with a human this long.
After Watanuki talks to the Yaobikuni, she gives it to Watanuki because he's the same as her - not able to live with the one who is important to them. The pearl is then passed on to Jorougumo to fulfill her request.
The payment for the pearl, along with Watanuki's blood, was the Shape Shifting Ring.