Gasoline is a mixture of carbohydrates. Carbohydrates contain the elements carbon and hydrogen that form a covalent compound. As the number of carbon atoms in a carbohydrate changes, so do its physical properties. The carbohydrates that gasoline is made up of contain between 4 and 12 carbon atoms. This gives it the boiling point it has and its viscosity.
Fats are made up of carboxylic acids (which are covalent compounds containing hydrogen, carbon and oxygen) that are linked together by molecules of glycerol.
The basic chemical similarity between gasoline and fats is that they are created by groups of several covalent compounds that primarily contain carbon and hydrogen; though fats also contain oxygen.
They have both been created by living organisms. Gasoline is derived from petroleum which is a product of plants that lived millions of years ago.