Preheat the oven to 200°C/400°F/Gas Mark 6
Heat the oil in a pan and cook the onions until soft and deep gold – about 20 minutes. Add the garlic and cook for a further five minutes. Set aside.
Roll out the puff pastry sheet on a lightly floured surface until about ½ cm in thickness. Score a rim of about 1cm all the way round. Transfer to a lightly greased upside-down baking sheet and prick the centre of the pastry all over with a fork up to the scored rim. Bake in the oven for five minutes until the edge has risen and the bottom starting to cook through.
Spread the onion mixture over the pastry up to the rim, then top with the halved tomatoes. Sprinkle over salt and pepper, thyme leaves and balsamic vinegar, then bake in the oven for 10-15 minutes until the pastry is cooked through and the tomatoes starting to soften. Serve warm.