To make the gnocchi, preheat the oven to 400 degrees F.
Cut the eggplant in half and place on a baking sheet cut side down along with the potatoes.
Bake the eggplant and potatoes until fork tender, about 50 minutes.
Let sit until cool enough to handle.
Scoop the flesh from the eggplant and puree, then place in a strainer in the sink for 30 minutes.
Scoop out the potato from the skin and pass through a ricer into a bowl.
Once drained, add the eggplant pulp, egg, and cup of flour.
Stir until mixed then dump onto a lightly floured surface.
Use your hands to lightly knead just enough to bring the dough together, dusting with additional flour as needed to prevent sticking.
Roll the dough into 1 inch thick logs, dusting with flour as needed.
Cut the dough into 1 inch pieces and place on a lightly floured baking sheet.
Refrigerate until needed.
To make the sauce, in a non-stick pan, heat the oil over medium heat until lightly smoking.
Add the onion and eggplant, and cook until they are both soft and lightly browned, stirring as needed to prevent sticking, about 8 minutes.
Add the garlic and cook an additional minute or two.
Add the remaining sauce ingredients, and cook over low heat until the sauce is very thick, about 30 minutes.
Heat a large pot of lightly salted water to a boil.
Cook the gnocchi just until they float to the top, then remove to a large bowl.
Add a ladle or two full of sauce to the bowl and gently toss the gnocchi to completely coat in the sauce.
Serve the gnocchi in individual bowls, topped with a little extra sauce, some shredded ricotta salta, and a few baby basil leaves.