Heat the oven to 375°F with racks in the upper- and lower-middle positions. In a small Dutch oven or medium oven-safe saucepan (about 3-quart capacity), whisk together the cornmeal, 1½ teaspoons salt and 5½ cups water. Bring to a gentle simmer over medium-high, stirring often, then place uncovered in the oven on the lower rack and cook for 1 hour.
Meanwhile, in a 9-by-13-inch baking dish, toss together the tomatoes, shallots, oil, thyme sprig, ½ teaspoon salt and ¼ teaspoon black pepper. Roast on the upper rack until the tomatoes have burst and are juicy, about 1 hour, stirring once about halfway through. Remove from the oven, then remove and discard the thyme. Cover with foil and set aside.
After the polenta has cooked for 1 hour, remove the pot from the oven. Add the butter and whisk until melted, then return the pot, uncovered, to the oven; cook until the granules are tender and the polenta is thick and creamy, another 10 to 30 minutes. Remove from the oven, whisk until smooth and let stand for 5 to 10 minutes. Taste and season with salt and pepper. Whisk in additional water, if needed, to thin.
Serve the polenta topped with the Gorgonzola, roasted tomatoes, chopped thyme and additional black pepper.
Optional garnish: Red pepper flakes
