Can it be harmful in any way for a cat to eat raw potato?

Yes. Raw potato and any part of the plant is toxic to a cat's system. Potatoes, as well as tomatoes belong to the plant family Solanaceae, and are related to Deadly Nightshade plant. They contain a poisonous alkaloid that can cause violent diarrhoea and other, more serious, symptoms. Uncooked or green potatoes and raw potato peelings are all toxic.

Once cooked, the alkaloid is destroyed, making the potato safe to eat.