Sometimes pesto can have a slight bitter flavor based on the plant but this can easily be fixed. Try adding a bit more salt and a sprinkle of sugar or citrus juice until it goes away.