Preheat the oven to 375 degrees Fahrenheit. Oil a 2-quart baking dish or gratin with olive oil.
Slice the potatoes about 1/4 inch thick and place in a large bowl. Season to taste with salt and pepper, and add the pesto or pistou. Stir the mixture until the potato slices are evenly coated, then transfer to the baking dish, making sure to scrape all of the pesto out of the bowl.
Cover the baking dish with foil or a lid and place in the oven. Bake 30 minutes, then uncover and return to the oven. Bake another 15 to 20 minutes, until the potatoes are thoroughly tender, the olive oil in the dish — now a beautiful green — is sizzling, and the top is beginning to color.