Combine the gluten-free flour, polenta, Parmesan, and salt in a bowl. Rub in the butter until the mixture resembles breadcrumbs. Add the beaten egg and mix until the dough comes together, adding water if needed. Form the dough into a disc, wrap in cling film, and refrigerate for at least 30 minutes.
Heat the rapeseed oil in a large skillet over medium heat. Add the onions, thyme, and salt. Cook, stirring occasionally, for 30–40 minutes until the onions are golden and caramelized. Stir in the vinegar and black pepper, then remove from heat and allow to cool.
Preheat the oven to 200°C (180°C fan). Roll out the chilled pastry between two sheets of baking paper into a rough circle, about 30 cm in diameter. Transfer the pastry to a baking sheet lined with parchment paper.
Spread the mustard onto the pastry and top with the caramelized onions, leaving a 4–5 cm border around the edges. Sprinkle the Gruyère cheese evenly over the onions.
Gently fold the pastry edges over the filling, pleating as needed to create a rustic look.
Whisk the egg with water and brush the mixture over the pastry edges for a golden finish.
Bake in the preheated oven for 25–30 minutes or until the pastry is golden brown and crisp.
Once the galette is out of the oven, scatter the chopped black olives over the top for a fresh, briny kick.
Let the galette cool slightly before slicing and serving. It’s perfect with a fresh salad!