Heat olive oil in a saucepan over medium heat. Stir in garlic, and cook until softened and fragrant, about 1 minute. Pour in diced tomatoes and red pepper flakes; bring to a simmer over medium-high heat, and cook for 10 minutes. Stir in shredded basil and season to taste with salt and pepper.
Bring a large pot of lightly salted water to a boil over high heat. Boil the gnocchi until they float to the surface, 1 to 2 minutes, then drain.
To assemble the dish, stir the cubed mozzarella cheese into the sauce and allow the heat of the sauce to soften, but not melt the cheese. Place gnocchi into a serving bowl, and spoon sauce over top