In a large heavy pot heat the olive oil over moderate heat and cook the onion until golden brown, stirring occasionally, about 8 to 10 minutes. Add the garlic and cook for another minute.
Add the tomatoes, vinegar, corn syrup, cloves, allspice, mustard seeds, celery seeds, salt and pepper stirring to combine. Bring the mixture to a boil, reduce heat and simmer, stirring occasionally, for 1 hour.
Pass the mixture through a food mill (or cheesecloth) into a bowl and return to the pot. Bring the mixture back to a simmer and cook until very thick, stirring occasionally, about 45 minutes. Allow the ketchup to cool.