Heat oven to 350° F. Bring a large pot of lightly salted water to boiling.
In a skillet over medium heat, cook pancetta until crispy, about 8 to 10 minutes. Remove pancetta with a slotted spoon. Pour off all but 2 tbsp of the pancetta fat. Stir onion into same pan and sauté 4 to 5 minutes over medium heat until softened. Add garlic and red pepper flakes; cook 2 minutes. Stir in tomatoes, 2 tbsp of the cheese, the thyme and cooked pancetta. Bring to a simmer and cook 10 minutes.
Meanwhile, add gnocchi to lightly salted boiling water. Allow water to return to a boil and cook gnocchi 1 minute. Drain, reserving 1/2 cup of the pasta water. Return gnocchi to pot. Stir in tomato sauce and reserved pasta water. Transfer to a 13 x 9 x 2-inch baking dish. Sprinkle with remaining 1/4 cup cheese and bake at 350° F for 20 to 25 minutes, or until cheese has melted and sauce is bubbling.