The object is to extract a pectin having excellent gelling effect from a potato starch pulp with high efficiency, and to produce a gelatinous food by using the pectin as a gelling agent. A pectin can be extracted from a potato starch pulp with a chelating agent at a temperature of 90 to 125°C inclusive under condition where the pH value given after the completion of the extraction is adjusted to 5.5 to 11 by adding a pH buffer. The pectin has superior gelling properties to that of a conventional LM-P.