Place a rack in the middle of the oven. Preheat oven to 425°F.
Directly on a large rimmed baking sheet, toss together the onion, garlic, tomatoes, gnocchi, olive oil, rosemary, salt, and pepper.
Place the sausages on the baking sheet, spacing them evenly around the pan. Arrange the vegetables and gnocchi in a single layer.
Roast, stirring halfway through, until the gnocchi are golden brown and starting to crisp, most of the tomatoes have burst, and the sausage reaches an internal temperature of 160°F, about 25-30 minutes. Taste and season with additional salt and pepper, if necessary.
To serve, spoon the gnocchi and vegetables onto plates, add a sausage link to each plate, and garnish with the basil and grated cheese.