Feel the butternut squash and scoop out the seeds. Place it facedown on a parchment lined baking sheet and bake for 20 minutes or until fork tender.
make the béchamel
Heat the butter in a saucepan over medium heat until melted and beginning to bubble.
Add the flour and whisk together until it forms a consistent paste (the roux). Keep stirring the roux for 1-2 minutes to cook. It should begin to smell nutty.
Pour the milk over the roux and whisk vigorously and consistently. The milk can be poured in either all at once or ⅓ at a time - both ways are fine.
Keep whisking until the bechamel thickens (3-4 minutes). If lumpy, whisk more vigorously. See post for troubleshooting details.
Stir in the gruyere and salt.
Taste the béchamel and add more salt as needed, keeping in mind it will also need to be seasoned enough for the squash.
assemble the gratin
Lay the puff pastry out in the roasting pan.
Slice the butternut squash thinly then arrange it over the puff pastry in the roasting pan.
Pour the béchamel over the squash and then crumble the pecans on top.
Reduce the oven temperature to 180 C / 360 F before putting the gratin in. Bake for at least 30 minutes or until the top is golden. If it browns too much in some spots, reduce the heat and roast until an even golden brown.