The plants that potato evolved from were toxic and people would soak them in a mix of clay and water to remove the toxicity. Eventually less poisonous varieties were created. Potatoes still produce toxins as a defence mechanism when exposed to light or late blight.
Why did you bite a raw potato? Did you wash and peel it first, at least?