Rinse fennel thoroughly. Trim stalks to within 1" of bulbs. Discard hard outside stalks; reserve fennel tops for another use. Cut a slice off bottom of bulbs. Cut out core from bottom of bulbs. Starting at 1 side, cut bulbs lengthwise into 1/4"-thick slices. Set aside.
Remove root, tough outer leaves, and tops from leeks, leaving 1" of dark leaves. Wash leeks thoroughly; cut into 1/4"-thick slices.
Sauté fennel and leeks in melted butter in a large skillet over medium-high heat 5 minutes. Add 3/4 teaspoon salt and 1 teaspoon thyme; cover, reduce heat, and simmer, stirring occasionally, 10 minutes. Set aside.
Combine potato, flour, and 1/2 teaspoon salt in a large zip-top plastic bag. Seal; toss to coat well. Arrange half of potato in a buttered gratin dish or 13" x 9" baking dish.
Combine whipping cream and milk; pour half of cream mixture over potato. Sprinkle 1 1/2 cups cheese and 1 teaspoon thyme over potato. Spoon sautéed fennel and leek over cheese, and top with remaining potato. Pour remaining cream mixture over potato, and sprinkle with remaining 1 1/2 cups cheese, 1 teaspoon thyme, and pepper.
Bake, covered, at 400° for 45 minutes. Uncover and bake 15 more minutes or until browned. Let stand 10 minutes before serving.