Prepare the tomatoes by blanching them in boiling water for about 30 seconds. Transfer them to an ice water bath afterwards and peel off the skins. Chop them and set aside.
In a large saucepan, combine the chopped tomatoes, onion and garlic. Cook over medium heat until the tomatoes and onions are soft. It will take about 10-15 minutes.
Use an immersion blender to blend the mixture until smooth. You can also transfer the mixture to a regular blender and blend the mixture well before transferring it back to the saucepan.
Add the apple cider vinegar, brown sugar, salt, black pepper, allspice, cloves, cinnamon, ginger, cayenne pepper, and tomato paste (optional). Stir well to combine.
Bring the mixture to a boil, then reduce the heat and let it simmer uncovered, stirring occasionally, until it thickens to your desired consistency. This can take 45 minutes to an hour.
Taste and adjust the seasoning if necessary. If you prefer a smoother ketchup, you can strain it through a fine-mesh sieve. Let the ketchup cool completely before transferring it to a clean jar or bottle. Store it in the refrigerator.