Preheat oven to 350°F. Melt butter in medium saucepan on medium heat. Sprinkle with flour; cook and stir with wire whisk 1 minute. Stir in shallot, garlic, rosemary, sea salt and pepper. Gradually add stock and cream, whisking until well blended. Cook and stir 5 minutes or until bubbling. Remove from heat. Add 1 cup of the Cheddar cheese and Gruyere cheese; whisk until cheese is melted.
Layer 1/2 of the potatoes in greased 2-quart baking dish. Pour 1/2 of the cheese sauce over top. Repeat layers.
Bake, uncovered, 1 to 1 1/4 hours or until potatoes are tender. Sprinkle with remaining 1/2 cup Cheddar cheese. Bake 5 minutes longer or until cheese is melted. Let stand 5 minutes before serving.