1. Cook onions in oil in a large nonstick frying pan over medium heat, stirring often, until soft, 8 to 10 minutes. Reduce heat to low and cook, stirring occasionally, until onions are very limp and deep golden brown, about 45 minutes longer. Stir in chopped thyme, salt, and pepper and let cool.
2. Preheat oven to 400°. Cover a large baking sheet with parchment paper and spread puff pastry over it. Bake until puffed and golden brown, 18 to 20 minutes.
3. Spread onion mixture over pastry, leaving a thin border (top-pings will deflate pastry).
4. Arrange anchovies in a grid of squares over onions and set an olive in the middle of each square. Bake until pastry is well browned, 10 to 15 minutes longer. Sprinkle with whole thyme leaves.
5. Slide tart onto a board and cut into squares. Serve warm or at room temperature.
*Puff-pastry packages vary. Pepperidge Farm's 17.3-oz. package contains 2 sheets; if using, spread the sheets on separate baking sheets and parbake 12 to 15 minutes, then divide toppings between the two and bake 10 to 12 minutes longer.