Add tomatoes and halved garlic bulb to a small baking dish. Cover completely with olive oil. Season with salt and pepper, and add herbs if using.
Bake for 1 1/2 to 2 hours, until tomatoes are soft and bursting. Stir a few times during cooking to ensure the tomatoes are cooking evenly.
Transfer tomatoes to an airtight container. Peel garlic cloves and add as well. Pour over infused oil to cover. Any extra oil can be strained and added to another container.
Store in the refrigerator and use within 2 weeks.
Notes
DO NOT store at room temperature. Tomato confit must be stored in the refrigerator.