The noun (Substantiv/Nomen) Gesamtkosten is feminine in German. Therefore, the correct definite article in the nominative singular is die. So, you say: die Gesamtkosten.
(total costs)
Compound Words: The last word (base word) ALWAYS determines the gender. Most fundamental and reliable rule in German gender assignment This word is composed and its gender is always determined by the root word.
Die Summe aller Kosten.
The sum of all costs.
Die Gesamtkosten des Projekts sind höher als erwartet.
The total costs of the project are higher than expected.