Heat the oil in a large saucepan or Dutch oven over medium heat. Finely chop the onions and add them to the pan, stirring occasionally for 10-15 minutes until softened and slightly browned.
Meanwhile, crush the garlic into fine pieces and grate the ginger. Chop the chilies, discarding the cap but keeping the seeds.
Add the garlic, ginger, and chilies to the browned onions and continue sauteing another minute, until the garlic becomes fragrant. Add the coriander, cumin, paprika, and turmeric, then saute another 30 seconds. Add in the tomatoes, chickpeas, reserved chickpea liquid (or 300 ml water), and salt, then bring everything to a simmer.
Continue cooking for about 15 minutes, stir in the spinach, a handful at a time to wilt it in, cook another 5-7 minutes, then add the Garam masala, lemon juice, and cilantro leaves (if using). Add a little more salt and/or additional heat in the form of cayenne pepper to taste. Serve.