Heat the oil in a heavy pot. Add the onions and carrots and cook, covered, over low heat until vegetables are tender, about 25 minutes.
Add the tomatoes, basil, thyme, salt, cayenne pepper and bay leaf. Cook over medium heat, stirring occasionally, for 30 minutes.
Remove the bay leaf and transfer the tomato mixture to the bowl of a food processor fitted with a steel blade, or use a food mill fitted with a medium disc, and purée.
Return sauce to the pot and set the pot over medium heat. Add the parsley and garlic and cook for another 5 minutes.
Taste and correct seasoning. Add the balsamic vinegar if the sauce seems to lack intensity. Serve immediately, or cool to room temperature, cover, and refrigerate or freeze.