In a medium pan over medium-high heat, cook the onion. Allow the onion to brown a little while stirring, adding a splash of water to the pan if it starts to burn.
Next, add the garlic and mushrooms and continue cooking until the mushrooms soften, again adding a little water as needed to keep the mixture from burning.
Add 1 cup of broth to the pan and stir. Season with pepper to taste.
In a small bowl, place the remaining cup of broth with the miso, tamari, and flour (if using), and stir until the miso has dissolved. Add the broth mixture to the pan.
Continue cooking until the gravy thickens to your liking.
Serve and enjoy!