You can substitute "la gasolina" with the direct object pronoun "la," resulting in the sentence:
"La compro en la estación de servicio."
In this case, "la" is used because "gasolina" is a feminine singular noun in Spanish. Direct object pronouns in Spanish must agree in gender and number with the noun they replace. Since "gasolina" is feminine singular, "la" is the appropriate pronoun to use.