Ayala was guilty of conceding possession cheaply inside his own area for the Moenchengladbach goal after eight minutes - but Hodgson had words of comfort for the young centre-back.
He told liverpoolfc.tv: "Ayala was our best player after the mistake and I think that shows what kind of character he is.
"To make a mistake like that after eight minutes, most players would crumble but not only did he get himself going again, I thought he was a pillar in our defence and I take my hat off to him.
"Mistakes are mistakes - they happen and you learn from it. I am pleased with him."