The youngster was shocked at seeing the photographs in the Robroyston branch of Asda, in the north east of the city, while she was taking pictures with the equipment.
She was at the store with her parents and uncle.
Stuart Craig, 27, from Moodiesburn, said his daughter started crying when she found pictures of a man's genitals.
He said: "She was really upset and shaken by the whole thing.
"We can't believe this has been allowed to happen, the whole thing is deplorable."
The family notified the store manager, who called police.
The youngster's uncle, Andrew Craig, 31, from Barmulloch, said: "She was looking at the iPads by herself when suddenly she came over to us. She was very upset. She had taken a picture of herself and had then gone into the iPad's camera gallery to look at it when she found photos of a man's genitals.
"We were all shocked and disgusted. Someone had obviously taken the picture in the store."
Mr Craig says stores need to monitor the use of computer equipment on display.
He added: "These display devices need to be controlled so this can't happen.
"It is shocking enough to see something like that in a supermarket if you are an adult, but it can be extremely traumatic for a young child."
A police spokeswoman said officers were investigating the incident.
She said: "We received a call about indecent images on display in an Asda branch in Glasgow. Inquiries are continuing."
An Asda spokeswoman said: "We have taken this report very seriously. We alerted police and are supporting them fully in their investigation."