Adjust oven rack to middle position and heat oven to 350°.
Melt butter in a large Dutch oven over medium-high heat.
Add onions and cook until softened and lightly browned, about 5-7 minutes.
Add potatoes, 1 half-and-half, 2 teaspoons salt and ¼ teaspoon black pepper and bring to a simmer.
Cover and adjust heat to maintain a light simmer and cook until potatoes are almost tender.
Transfer potato mixture and ham to a 3-quart gratin dish and sprinkle with cheese.
Bake until half-and-half has thickened and is bubbling around sides and top is golden brown.
Cool for 5 minutes before serving.
