Where do Kekkei Genkai abilities (genetic abilities) originate from? In Naruto there is a group of abilities called Kekkei Genkai (血継限界). They are told to be "genetic" abilities which are (usually) passed down genetically within specific clans. 

Notably, the eye techniques (Dōjutsu, 瞳術), such as sharingan, are also a subset of those.

How did those abilities first appear? Did they appear naturally, or were they made on purpose as a result of experiments?
Sharingan:
I'm guessing this would've appeared naturally, as with other Doujutsu (Byakugan and Rinnegan). Legend has it that these clans descended from the Rikudou's eldest son, who received his father's "eyes": his powerful chakra and spiritual energy.

Kekkei Genkai Ninjutsu:
I think these were developed by ninja who possessed special abilities and chakra nature affiliations. They were, later on, passed down on the next generations. According to this Leaf Ninja's page, they are creations indeed.

Potential Bloodlines and Genetic Advantages:
There are also Potential Bloodlines and Genetic Advantages, which also seem to be passable down onto the next generation, such as Suigetsu's and Mangetsu's body, which is unique to them and gives them a genetic advantage (I think these could've been the basis for the development of some Kekkei Genkai in the early stages of clans, though not in Suigetsu's and Mangetsu's case). I don't think they are considered Kekkei Genkai, but they could've been linked in early stages of development of a clan's special technique. I found out about these in this Leaf Ninja's page.