"Gratiam sibi referendam putabat quod Troianos servaverat" = "She figured that favour/gratitude/esteem was due[/ought to be given] to her because she had helped the Trojans."

Sed verum ambiguum est quod et hoc habes:

"She figured that a service/favour [given to Aeneas] was due[/ought to be repaid] to her, namely that [/the fact that] she had helped the Trojans." This fits the question "quam gratiam...?" // quod aptum est quaestioni citatae.