Dice the ham. Clean and slice the mushrooms. Wash, drain and halve the tomatoes. Peel and finely dice onion and garlic. Heat 1 tablespoon of oil in a pan, toss the tomatoes briefly in it, season with salt and pepper and remove.
Put 1-2 tablespoons of oil in the hot pan, fry the onion and garlic in it. Add the mushrooms, fry lightly. Add ham. Dust with flour, sweat briefly, pour on cream. Stir in tomato paste, ketchup and herbs, bring to the boil and simmer for about 2 minutes.
Meanwhile, put the gnocchi in bubbling salted water and cook for 2 minutes until they float on top. Drain the gnocchi, drain well and put them into a greased casserole dish. Stir the tomatoes into the sauce, season with salt and pepper and pour over the gnocchi.
Drain the mozzarella and cut into slices. Sprinkle the casserole with Gouda and cover with mozzarella. Bake in the preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: level 3) for 25-30 minutes.
Serve garnished with fresh herbs.