Boil the potatoes in salted water until soft, about 20 minutes, less if using fingerling potatoes. Drain and once the potatoes are cool enough to handle, peel off the skins. Return potatoes to the pot, add one tablespoon butter and mash.
Stir in the flour, egg and one teaspoon of salt. Knead until potatoes form soft dough. Add more flour if the dough is too soft and sticky.
On a floured surface, roll small portions of the dough into a long rope. Cut the rope into ¾-inch pieces. Press each piece of dough with a fork to make indentations.
Bring a large pot of lightly salted water to a boil. Cook the gnocchi in batches until they float to the top, about 3-5 minutes. Remove with a slotted spoon to a sheet tray.
Melt the remaining 2 tablespoons butter in a large skillet. Add boiled gnocchi, making sure they are dry. Sear each side for a couple of minutes.
In a small saucepan put pear slices and enough water to cover; bring to a boil. Simmer for 3-5 minutes or until pears are soft, but not mushy; drain, reserving one tablespoon of the liquid.
In the same saucepan, bring heavy cream and one tablespoons pear water to a boil and simmer until reduced and somewhat thickened, stirring occasionally, about 10 minutes. Add Gorgonzola and lemon juice; season with salt and pepper. Mix until cheese has melted.
Meanwhile, toast walnuts in a small sauté pan with butter, thyme, and rosemary making sure they don't burn.
Add walnuts and pears to the sauce. Serve over gnocchi with extra Gorgonzola crumbles and Parmesan cheese if desired.