Heat oil in a medium skillet over medium-high heat. Add onions and garlic and sauté for about 2-3 minutes, stirring occasionally, until the onions are translucent and fragrant.
Stir in the flour and cook for 2 minutes, stirring constantly. It will be very thick and want to stick to the bottom; keep stirring to prevent the flour from burning.
Add mushrooms, vegetable broth, red wine, and spices and stir together. Bring to a boil. Once boiling, stir constantly for 5-7 minutes, until gravy begins to thicken. Taste and adjust seasoning. If the gravy is too thick, add a bit of extra vegetable broth. If your gravy is too thin, you can combine 1 tablespoon of water and 1 tablespoon of flour in a small bowl. Mix it very well and then stir it into the gravy.
For a smooth gravy, you can blend it in a food processor or with an immersion blender. If you prefer having some texture, serve your gravy straight from the saucepot.