Heat oven to 400 degrees. Butter a 6-cup baking dish. Lightly beat egg yolks; set aside.
In a saucepan over medium heat, bring 2 cups of milk, cayenne, and salt to a boil. Sprinkle cornmeal into liquid, stirring constantly, and cook until thick and smooth, about 3 minutes. Stir in remaining 1/2 cup milk, baking powder, and egg yolks.
In a mixing bowl, beat egg whites until stiff. Stir 1 large spoonful of whites into cornmeal mixture, then gently fold in remaining whites.
Pour half of the batter into prepared dish. Sprinkle on corn and leeks. Cover with remaining batter. Bake until set and golden brown, about 35 to 40 minutes. Serve immediately.