Toss the tomatoes, onion, garlic, oil, cayenne pepper and about a teaspoon of salt together in a glass baking dish. Roast at 350 degrees Farenheit until the tomatoes have released their juices and the onions are caramelized, about 30-40 minutes.
Remove the tomato mixture from the oven. Remove the garlic and empty the rest of the dish into a saucepan. Use water or a little bit of red wine to deglaze the pan, scraping up any bits. Squeeze the garlic cloves to allow the soft garlic to combine with the rest of the ingredients.
With an immersion blender, blend the ingredients until smooth.
Add salt and pepper to taste, as well as the dried basil. Serve with crusty baguette.