Adjust oven rack to middle position and heat oven to 400 degrees.
Heat oil in 12-inch skillet over medium-high heat until shimmering.
Add garlic and cook until fragrant, about 30 seconds.
Add spinach, 1 handful at a time, allowing each to wilt slightly before adding next; cook until wilted and liquid has evaporated, about 4 minutes.
Off heat, add cream cheese and stir until melted and combined, about 1 minute.
Stir in gouda, Parmesan, artichokes, mayonnaise, pepper, and cayenne until combined.
Transfer to 2-quart baking dish and smooth top with rubber spatula.
Bake until spotty golden brown and bubbling around edges, about 22 minutes.
Let cool for 10 minutes. Serve.
