In a large skillet, heat oil over medium-high. Add squash and garlic and season with salt and pepper. Cook, stirring occasionally, until squash is crisp-tender, 4 to 5 minutes. Add tomatoes and cook, stirring occasionally, until juicy, about 2 minutes.
Meanwhile, in a large pot of boiling salted water, cook gnocchi according to package instructions. Reserving 1/2 cup cooking liquid, drain gnocchi and transfer to skillet. Toss gnocchi, adding enough cooking liquid to create a sauce. Remove from heat and stir in basil, cheese, butter, and lemon juice.