There’s something irresistibly cozy about a bubbling dish fresh from the oven, especially when it combines the pillowy softness of gnocchi with the vibrant, herbaceous punch of pesto. My love affair with Pesto Gnocchi Gratin began on an evening when I craved comfort food with a twist—something familiar yet exciting. This dish delivers layers of creamy, cheesy goodness topped with a golden crust that makes every bite melt in your mouth. What I love most is how effortlessly it comes together, turning simple pantry staples into a crowd-pleasing masterpiece perfect for weeknight dinners or casual gatherings. If you’re tired of the usual pasta routine and hungry for something that feels both indulgent and fresh, this gratin is about to become your new go-to.
Why Choose Pesto Gnocchi Gratin?
Comfort food elevated: This dish transforms soft, pillowy gnocchi with bright, flavorful pesto for a fresh twist on classic comfort. Easy preparation: Minimal ingredients and simple steps make it accessible for any home cook. Crowd-friendly: Creamy, cheesy layers with a crispy topping satisfy diverse tastes. Versatile meal: Perfect for weeknights, dinner parties, or cozy family meals. Time-saving: Ready in under an hour, it fits busy schedules without sacrificing flavor.
Pesto Gnocchi Gratin Ingredients
For the Gnocchi Base
- Potato gnocchi – Use store-bought or homemade for that pillowy texture every time.
- Pesto sauce – Fresh basil pesto adds vibrant, herbal flavor to make this in an irresistible Pesto Gnocchi Gratin.
- Heavy cream – Creates a rich, velvety sauce that coats every pillowy gnocchi perfectly.
For the Cheese Layer
- Fresh mozzarella – Melts beautifully, lending gooey, creamy notes throughout the gratin.
- Parmesan cheese – Adds a salty, nutty crunch when melted and browned on top.
For Garnish and Finish
- Pine nuts – Toasted lightly for a buttery crunch that complements the pesto’s herbs.
- Fresh basil leaves – Brighten the dish with aromatic freshness just before serving.
How to Make Pesto Gnocchi Gratin
- Preheat oven: Set to 375°F (190°C) for a hot, even bake and a golden-brown cheese crust atop your Pesto Gnocchi Gratin.
- Boil gnocchi: In generously salted water until they float and become tender, about 2–3 minutes. Drain well and transfer immediately to a mixing bowl to retain warmth.
- Mix base: Stir pesto and heavy cream into the warm gnocchi until each piece is coated in a silky green sauce binding flavors beautifully.
For the Cheese Layer:
- Layer gnocchi: Spread the pesto-coated gnocchi evenly in a greased 9×13-inch baking dish, then top with torn fresh mozzarella and a generous sprinkle of grated Parmesan.
- Bake gratin: Slide the dish into the preheated oven and bake for 20–25 minutes, until cheese is melted, golden-brown, and edges are bubbling crisp.
For the Garnish and Finish:
- Toast pine nuts: In a dry skillet over medium heat, stir pine nuts constantly until they turn fragrant and golden, about 3–4 minutes. Set aside to cool slightly.
- Garnish & serve: Scatter toasted pine nuts and fresh basil leaves over the hot gratin. Let rest 2 minutes to meld flavors before scooping onto plates.
Optional: Drizzle extra virgin olive oil over each serving for silky richness.
Exact quantities are listed in the recipe card below.

Storage Tips for Pesto Gnocchi Gratin
Fridge: Store leftover Pesto Gnocchi Gratin in an airtight container for up to 3 days. Allow it to cool completely before sealing to maintain texture.
Freezer: Freeze in an airtight container for up to 2 months. For best results, wrap individual portions in plastic wrap before placing them in a freezer-safe bag.
Reheating: Reheat leftovers in the oven at 350°F (175°C) until heated through, about 20-25 minutes. Cover with foil to prevent drying out, then remove the foil for the final 5 minutes for a crispy top.
Room Temperature: Allow the gratin to sit at room temperature for no more than 2 hours if serving leftovers.
Pesto Gnocchi Gratin Variations
Feel free to explore these delightful twists and substitutions for your Pesto Gnocchi Gratin—each one will bring a unique flair to this cozy dish!
- Whole Wheat Gnocchi: Swap regular gnocchi for whole wheat to boost fiber and add a nutty flavor.
- Vegan Version: Use vegan pesto and cheese alternatives, combined with creamy coconut milk for a plant-based delight.
- Extra Veggies: Stir in sautéed spinach or roasted cherry tomatoes for added nutrition and vibrant color.
- Spicy Kick: Add red pepper flakes to the pesto for a warm, zesty finish that livens up every bite.
- Nut-Free Option: Replace pine nuts with sunflower seeds for a delicious crunch that’s still nut allergy-friendly.
- Herb Infusion: Sprinkle in fresh thyme or oregano to the mixture for an aromatic twist that enhances the earthy flavors.
- Cheese Swap: Experiment with different cheeses like fontina or goat cheese for a unique richness and depth.
- Baked Toppings: Top with crushed potato chips or panko breadcrumbs mixed with olive oil for an extra satisfying crunch.
Remember, cooking is all about experimenting and finding the flavors that warm your heart!
What to Serve with Pesto Gnocchi Gratin?
Embrace the delightful pairing possibilities that will elevate your cozy meal into a full culinary experience.
-
Garlic Bread: This classic side brings a crunchy texture that complements the creamy gratin, perfect for scooping up every bite.
-
Simple Arugula Salad: The peppery bite of fresh arugula adds a refreshing contrast, balancing the richness of the gnocchi beautifully.
-
Roasted Cherry Tomatoes: Their sweetness and juicy bursts create a vibrant accompaniment that enhances the herbal notes of the pesto.
-
Steamed Broccoli: Adding a tender, green veggie offers a nice crunch and elevates the health factor without overwhelming the dish.
-
White Wine: A chilled glass of Sauvignon Blanc brings out the flavor of the herbs in the gnocchi, making for a sophisticated sip.
-
Chocolate Mousse: Finish on a sweet note with this light, airy dessert. Its rich decadence creates a lovely contrast to the savory gratin.
-
Homemade Lemonade: The citrusy zing provides a refreshing lift, perfectly counteracting the creamy, cheesy elements on your plate.
Make Ahead Options
Pesto Gnocchi Gratin is a fantastic recipe for meal prep! You can prepare and assemble the entire gratin up to 24 hours in advance. Simply mix the cooked gnocchi with pesto and cream, layer it with cheese, and cover tightly with plastic wrap before refrigerating. To maintain quality, ensure that the dish is well-sealed to prevent moisture loss. When you’re ready to bake, simply remove it from the fridge and place it in a preheated oven at 375°F (190°C), adding an additional 5-10 minutes to the baking time for a perfectly bubbly and golden top. This approach not only saves you time but allows the flavors to meld beautifully, making your Pesto Gnocchi Gratin just as delightful when served fresh from the oven!
Expert Tips for Pesto Gnocchi Gratin
- Choose quality gnocchi: Use fresh or high-quality store-bought potato gnocchi to ensure a soft, pillowy texture that holds up well during baking.
- Drain gnocchi thoroughly: Avoid soggy gratin by draining gnocchi very well after boiling, letting excess water evaporate before mixing with pesto and cream.
- Balance pesto flavor: Stir the pesto and cream gently into warm gnocchi to evenly coat without overpowering; too much pesto can mask the dish’s creamy richness.
- Layer cheeses strategically: Distribute fresh mozzarella evenly for gooey melt, then sprinkle Parmesan on top for a well-browned, crispy crust.
- Watch baking time: Keep an eye on the gratin during the last 5 minutes to prevent burning while achieving a golden, bubbly finish.
- Add garnish last: Toast pine nuts and fresh basil just before serving to preserve their crunchy texture and bright aroma in this cozy Pesto Gnocchi Gratin.
Pesto Gnocchi Gratin Recipe FAQs
How do I know if my potato gnocchi is fresh and good to use?
Look for gnocchi that are soft but hold their shape without becoming mushy. Fresh gnocchi should be slightly pillowy with no dark spots or sticky residue. If using store-bought, check the expiration date and select packages that are refrigerated or frozen properly.
What’s the best way to store leftover Pesto Gnocchi Gratin?
Absolutely store any leftovers in an airtight container in the refrigerator for up to 3 days. Make sure the gratin has cooled fully before sealing to keep the creamy texture intact. When ready to enjoy again, gently reheat in the oven to revive the golden cheese topping.
Can I freeze Pesto Gnocchi Gratin, and how should I prepare it for freezing?
Very good question! Yes, you can freeze this delightful dish for up to 2 months. For best results, portion the gratin into single or family-size servings, then wrap each portion tightly in plastic wrap and place inside a freezer-safe bag or container. When thawing, let it sit overnight in the fridge before reheating in the oven to maintain that ooey-gooey texture.
What if my gnocchi turns mushy or falls apart during baking?
This sometimes happens if gnocchi absorbs too much moisture. To avoid mushiness, drain them thoroughly after boiling and let them sit a moment to evaporate excess water before mixing with pesto and cream. Also, avoid overbaking—20 to 25 minutes should be just enough for a perfectly baked gratin without falling apart.
Is Pesto Gnocchi Gratin safe for pets or people with nut allergies?
Because this recipe uses pine nuts in the pesto and as garnish, it’s best to avoid serving this to pets or individuals with nut allergies. However, you can omit the pine nuts and use a nut-free pesto alternative to keep it allergy-friendly without losing the rich flavor. I recommend trying a basil and sunflower seed pesto as a tasty swap!

Irresistible Pesto Gnocchi Gratin Recipe for Cozy Homemade Comfort
Ingredients
Equipment
Method
- Preheat oven to 375°F (190°C).
- Boil gnocchi in salted water until they float, approximately 2-3 minutes. Drain and transfer to a mixing bowl.
- Stir pesto and heavy cream into the warm gnocchi until coated.
- Spread the gnocchi evenly in a greased baking dish, top with mozzarella and parmesan.
- Bake for 20-25 minutes until cheese is melted and bubbly.
- Toast pine nuts in a skillet over medium heat until golden, about 3-4 minutes.
- Garnish the gratin with toasted pine nuts and fresh basil leaves, let rest for 2 minutes before serving.




