For the turkey: Pat the turkey dry and let it stand at room temperature at least 1 hour and up to 2.
Preheat the oven to 350 degrees F.
Grate the zest from the lemons and orange, then cut the citrus fruit in half and reserve. Chop enough fennel fronds to measure 1 tablespoon. Put the butter in a bowl and add the citrus zest, chopped fennel fronds, 2 1/2 teaspoons salt and 1/2 teaspoon pepper and mix to combine thoroughly.
Slide your hands between the breast and skin of the turkey to carefully loosen the skin. Use your fingers to loosen the skin over the drumsticks and thighs as well. Rub all but about 1 or 2 tablespoons of the butter mixture all over the turkey under the skin. Rub the remaining butter mixture over the surface of the turkey. Season the turkey all over with salt and pepper.
Squeeze the juice from 1 of the reserved orange halves and 2 of the lemon halves into the bottom of a large roasting pan and then insert all of the citrus halves (including the juiced ones), the fennel quarters and half of the thyme into the cavity of the turkey. Tie the turkey legs together with twine. Add the stock and remaining thyme to the bottom of the pan with the citrus juices. Position a roasting rack in the roasting pan and put the turkey on the rack.
Roast, rotating the pan halfway through, until an instant-read thermometer inserted into the thickest part of the breast registers 160 degrees F, 2 1/2 to 3 hours. (If the turkey and wing tips are browning too quickly, lightly cover with foil and remove in the final 30 minutes of cooking.) Let the turkey rest for 30 minutes before carving.
Using a ladle, carefully remove the pan juices from the bottom of the pan and pour into a fat-separating liquid measuring cup for the gravy. Allow to sit for 5 minutes so the fat rises to the top.
For the gravy: Melt the butter in a medium saucepan over medium heat. Add the thyme and shallots and cook until softened, about 3 minutes. Gradually add the flour and cook, whisking, until golden and nutty smelling, about 3 minutes. Add the Marsala wine and continue to whisk. Slowly pour in the stock and separated pan juices while mixing, making sure to incorporate the flour mixture as you go. Increase the heat to medium high and bring to a simmer. Simmer, stirring occasionally, until slightly thickened, about 5 minutes. Add the sugar if needed to balance any bitterness from the citrus. Season with salt and pepper. Keep warm until ready to eat, then strain into a gravy boat.
Carve the turkey and place on a large serving platter. Garnish with fennel fronds. Serve with hot gravy.