I would guess that using "con" (or "col") here would mean that you were with your gift and you were happy, but it would probably be grammatically incorrect.
It is "del" because she is happy ABOUT the gift. "With" is just an idiomatic phrase in English when used this way.
I have given up trying to apply English logic to Italian pronouns. They are just different in so many ways.
That is fair enough, but there are some that translate fairly reliably. "About" is one of these; as far as I can think, it always translates to di.
It helps me to become more familiar with the pronouns that are reliably attached to certain verbs
Hi! I have a question for you ! Is "To be happy with" an idiomatic expression?
I wrote : "She was very happy of my gift" and I went wrong.
Yes, it is an idiomatic expression. You can say "I am happy with the gift", or I am happy about the gift, or even I am happy for the gift. But I am happy OF the gift does not make sense in English.
True, but this sentence says era molto contenta, and contenta is feminine, so that makes era = "she was" for this sentence.
When molto is an adjective it changes with the gender. When it is an adverb, it always remains molto. The explanation I saw said that adjectives modify nouns, but adverbs modify verbs, adjectives or other adverbs. In this case molto is modifying an adjective (contenta). Therefore, molto is an adverb, and does not change.