In a small pot, combine the vinegar and the sugar and being them to a boil. Reduce to a rapid simmer and cook until mixture is syrupy, about 6 minutes. Remove from heat and stir in the garlic, red-pepper flakes, and the salt. Let cool to room temperature before using. (To store, refrigerate in an airtight container, up to 1 week.)