Hakaras HaTov (Gratitude) is a very important trait in Torah. Can the principle of Hakaras HaTov create a situation where what is otherwise prohibited becomes permitted?
In most cases it is prohibited to use flattery or to lie to somebody.
However, there is a case in the gemorah (Sanhedrin 107b and Sotah 47a) where out of hakarot hatov for a fine meal and a good lodging, the rav says to the innkeeper that she is beautiful. His student objects that her eyes are not pretty, to which the rav pushes away his student.