Preheat oven to 325°F. Remove turkey giblets and neck, then pat turkey completely dry with paper towels.
Mix butter with sage, thyme, salt, and pepper. Gently loosen breast and thigh skin; spread butter underneath.
Stuff the cavity with onion quarters and lemon halves. Tie legs together with kitchen twine and tuck wing tips under the body.
Place turkey breast-side up on a rack in a large roasting pan. Pour 2 cups of stock into the bottom of the pan.
Roast for 3 to 3.5 hours, basting every 30 minutes with pan drippings. If skin browns too quickly, tent loosely with foil. Turkey is done when internal temperature reaches 165°F in the thickest part of the thigh.
Transfer turkey to a cutting board and let rest for 30 minutes before carving.
For gravy, separate drippings; skim fat, reserving 1/4 cup. Heat reserved fat over medium heat; whisk in flour and cook 2 minutes. Gradually whisk in defatted drippings and remaining 2 cups stock. Simmer 5-7 minutes, stirring, until thickened. Season with salt and pepper.