Place the vinegar in a small non-reactive saucepan and heat to a boil. Add the sugar, stirring until it has completely dissolved, then lower the heat to medium-low and let simmer for 5 minutes.
Meanwhile, using a mortar and pestle or a bowl and the back of a spoon, pound or mash the garlic and salt to a smooth paste. Stir in the pepper flakes and blend well. Remove the vinegar mixture from the heat and stir in the garlic paste. Let cool to room temperature. Store sealed in a glass jar in the refrigerator for up to 2 days.