Gastrique is caramelized sugar, deglazed with vinegar or other sour liquids, used as a sweet and sour flavoring for sauces.
The gastrique is generally added to a fond, reduced stock or brown sauce. It is also used to flavor sauces such as tomato sauce, savory fruit sauces, and others, such as the orange sauce for duck à l'orange.
The term is often broadened to mean any sweet and sour sauce, e.g., citrus gastrique or mango gastrique. An agrodolce is a similar sauce found in Italian cuisine.
It is different from the Belgian sauce base of the same name, which consists of vinegar, white wine, shallots, tarragon stems, bouquet garni, and peppercorns. The gastrique with this composition was already used by Auguste Escoffier, but at the end of the 19th century, Louis Védy from Brussels turned it into a plant extract that ensures a constant level of acidity when making béarnaise sauce.
Caramel dissolved in vinegar is used by Escoffier in 1903, with no special name, just described as "sucre cuit au caramel blond, dissous avec 1 décilitre de vinaigre" in his recipes for Sauce Romaine and Carpe à la Polonaise; similarly, Prosper Montagné in 1922 just says "caramel au vinaigre", and the Répertoire de la Cuisine says "caramel blond dissous au vinaigre".
The name gastrique appears to have come in with nouvelle cuisine by the 1980s, defined as an "indispensable preparation used in making sauces to accompany hot creations including fruits, such as duck à l'orange."