Spinach is sweeter than basil which is typically used to make pesto. If your pesto still tastes bitter try adding a pinch of sugar.