Though Cersei had the upper-hand in the war for the Iron Throne, Daenerys literally fired back with her dragon, Drogon, and the Dorthraki army, turning the tide of the war. Besides the number of lives lost on Cersei's side, many fans worried Daenerys' attack also cost Cersei a lot of money. But why does Cersei need gold on Game of Thrones? Unfortunately, she inherited a large debt.
Way back in Season 1, Ned Stark (RIP) was shocked to discover the Iron Throne was six million Gold Dragons in debt. It's unclear how that currency translates to American dollars but six million of anything sounds like a lot of money in any form. Most of this debt was owed to the Iron Bank of Braavos, which has come up a few times over the seasons, especially with people needing help to fund their wars.
Since Season 1, the Iron Throne has accrued an even larger amount of debt because of the "War of the Five Kings," as the ongoing fight for the throne has been called. Fighting against Robb Stark, Stannis Baratheon, and now Daenerys has cost the throne dearly, and now that Cersei is queen, that debt now rests on her shoulders. That's why Tycho Nestoris, a representative from the Iron Bank, is now hanging out in King's Landing.
Cersei promised to get him the money in a fortnight and despite Daenerys' well executed attack, it seems Cersei will be able to keep her word. By sending Jaime and his forces to Highgarden, the home to House Tyrell, Jaime was able to get all the gold Cersei needed to pay the debt back in full. House Tyrell may not have had a big army, but they were the richest house in Westeros. It's why Lady Olenna ended up paying for most of Joffrey and Margaery's wedding way back when.
Though Daenerys burned through the Lannister troops and all the grain they were collecting for the upcoming winter, according to Lord Tarly, all the gold had already safely made it through the gates of King's Landing. Therefore, although this was certainly a devastating blow to Cersei's resources, it also won't put her out of commission in this war.
Now that she has paid back her debts to the Iron Bank, she has gained another powerful ally. Sure, Daenerys has her three dragons, but as Cersei has already proven, that may not be enough to help Daenerys win this war.