School staff eventually became so concerned for the state of the youngster – who was filthy and smelled of smoke and urine – that the police were called in.
Perth Sheriff Court was told the child was repeatedly infested with lice and could not see properly because she had not been given the glasses she needed.
The woman, who cannot be named for legal reasons, admitted failing to seek medical, eye and dental care for the toddler in a course of abuse which began before the girl turned two.
Sheriff Lindsay Foulis told the grandmother, who has no previous convictions, that her status as a first offender may not be enough to prevent her being sent to prison.
Sheriff Foulis said: "I am considering a custodial sentence. There is no acceptance on her part that over the course of five years she has effectively neglected her granddaughter."
The 49-year-old, from Perth, admitted that between January 1, 2006 and May 9, 2011 she wilfully neglected a child in a manner likely to cause unnecessary suffering or injury to health.
Solicitor Steve Lafferty, defending, said: "She has found it very difficult to accept culpability. She has had difficulty with agoraphobia in the past which has impacted on her personal care and on her granddaughter."
Sentence was deferred to allow for the preparation of a medical report on the accused.