Heat the oil in a large pot or Dutch oven over medium heat. Add the onion and a pinch of salt and cook until soft and lightly browned around the edges – about 8 to 10 minutes, reducing the heat to low as needed.
With the heat on low, add the garlic, ginger, curry powder, and red pepper flakes and cook, stirring, until fragrant – about 2 minutes.
Add the tomatoes, lentils, water, coconut milk, ½ teaspoon salt, and several grinds of black pepper. Bring to a boil, cover, and reduce the heat. Simmer, stirring occasionally, until the lentils are tender – about 25 to 35 minutes. If your soup is too thick, stir in ½ to 1 cup more water to reach your desired consistency.
Stir in the cilantro and lime juice. Season to taste with salt and pepper and serve.