Heat the ghee in a heavy pot over moderate heat until it is very hot.
Add the ginger and garlic and cook for 30 seconds.
Add the onion and salt and cook, stirring frequently, until the onion is soft and golden brown, about 8 minutes.
Stir in the cumin, turmeric, and cayenne, followed by the tomatoes.
Cook, stirring frequently, until most of the liquid has evaporated and the mixture forms a thick paste, about 5 minutes.
Add the peas and tomatoes and stir to coat them with the tomato mixture.
Stir in the water and bring to a boil, stirring frequently.
Reduce the heat and simmer covered for 10 minutes, until the potatoes are tender.
Sprinkle with chopped cilantro and garam masala and serve immediately.