Jesus was using two arguments. The first was a Jewish argument. He quoted Psalm 82:6, which is a warning to unjust judges to stop from their ways and defend the poor and the innocent.
He goes on to talk about "you are gods". This comes from Exodus 21:1-6 which tells how the Hebrew servant gets to go free in the 7th year. The hebrew word translated judges is elohim, which means gods. It is also used in Exodus 22:9, 28. Men who were specially commissioned by God were in scripture sometimes said to be gods.
Jesus was using this in His argument saying that if scripture can say that about men, then why can I not also say it?
The Jews understood something being consecrated. Example: Sabbath is holy, the alter is holy, the priest are holy. They understood that certain things were set aside by God for a special purpose.
Jesus was saying that God consecrated Him and He was holy and set apart from other men.