Heat a wide pan on low heat and dry roast the besan flour for 2-3 minutes or until it turns aromatic.
Reserve 3-4 tablespoons of ghee for later use and whisk the besan flour with the rest of the melted ghee to form a smooth batter like consistency. Set aside.
To prepare the sugar syrup, take sugar and water in a pan on low-medium heat and melt it.
Once the sugar syrup starts to bubble, lower the heat to minimum and let it boil.
Check for one string consistency in sugar.
Add the ghee-besan mixture to the sugar syrup when it has reached a one string consistency and stir to mix it uniformly. (refer notes)
Cook on a low flame and add the reserved ghee to the pan, one tablespoon at a time to make sure the besan mixture does not stick to the pan. It starts to froth while adding the ghee.
Meanwhile, grease a container to pour the mysore pak mixture, with some ghee.
After a few minutes of continuous stirring the besan mixture will come together, still being in pouring consistency. At this point, turn off the flame and pour the mixture on to the greased container.
Give the container a slight tap to make sure the mixture evenly spreads. Let it set for 2 minutes. When it is still warm, make the pieces with a knife greased with some ghee.
After about 20-30 minutes , separate the pieces and serve warm or cold as desired.