Preheat the oven to 350 degrees.
In a medium baking dish (I used an 8 x 8-inch Pyrex), combine the olive oil, garlic, thyme, and bay leaves. The garlic should be completely covered by about 1 inch of oil.
Bake until the garlic cloves are soft, fragrant, and lightly browned but still hold their shape, 45 minutes to 1 hour.
Remove from the oven and let cool to room temperature. Store in an airtight container in the refrigerator for up to 2 months, completely covered with olive oil to prevent air from reaching them.