The attack happened when the child went to show the priest a picture she had drawn of a chapel, the hearing was told.
The Scottish Child Abuse Inquiry, sitting in Edinburgh, is examining children’s homes, no longer operating, which were run by the Catholic congregation the Sisters of Nazareth in Scotland.
A woman, who cannot be named, told the inquiry the incident happened shortly before she left Nazareth House in Cardonald, Glasgow, in the 1970s.
She described an occasion when she attended confession at a church in the area and afterwards presented the priest with a picture she had drawn of a small chapel next to Nazareth House.
By this time, the priest was in the section of the confessional that she was in.
“I was showing him the picture, he was saying it was lovely and praising me,” she said.
“He was behind me and I think he still had the picture in his hand.
“I could remember him lifting up my skirt and putting his hands inside my underwear and rubbing himself against me.”
The woman, who could not remember the priest’s name, said she did not report the assault to the nuns at the home, believing “they would have said it was my fault”.
“I actually liked the interest I was getting,” she admitted.
“I thought he cared about me.”
Earlier, the inquiry heard how a nine-year-old girl was sexually attacked by a “stranger” she was told was her father after being taken away for the day from the children’s home.
A woman, who also cannot be identified, told the inquiry she was at Nazareth House in Cardonald for around eight years in the 1970s.
She recounted how she was at school when a member of staff came to tell her she had a visitor at the home – something that made her “excited”.
She returned to the home and was driven away by a man in a car.
“I’d like to know why he was allowed to come and take us,” she told the hearing.
The witness told how she went to a house, where the man put his arm around her.
“Bearing in mind nobody had ever put their arms around me, nobody had ever told me they loved me, it was acceptable,” she said.
The hearing continues.