Prepare the sauce. Heat olive oil in a frying pan and fry chopped garlic. Add tomatoes to the garlic, salt and pepper the mixture. Stir and simmer the sauce over low heat for 5-7 minutes. Add basil to the sauce, stir and leave the sauce in a warm place.
Make mashed potatoes. Gradually add butter to the potatoes. Make sure that there are no large pieces of potato left in the mashed potatoes. Mash the cheese and add to the mashed potatoes. Then beat the eggs into the mashed potatoes and mix everything thoroughly. Gradually add flour to the mashed potatoes, making sure that the dough does not become too dense. Finally, add baking powder. Salt and pepper the resulting mass.
Prepare the gnocchi. Form small sausages from the dough. Bring water to a boil in a saucepan and cook the gnocchi for 3-4 minutes, remove the dumplings from the water with a slotted spoon and arrange them on a plate. Pour the sauce over the hot gnocchi and serve immediately.