Probably you didn't allow sufficient time for your filtered PWM output to settle and that accounts for the difference in results between 1k\$\Omega\$ and 3.3k\$\Omega\$.
Using the (default, I think) 490Hz PWM frequency and the values of 3.3k\$\Omega\$ and 22\$\mu\$F (time constant of \$\tau\$= RC = 73ms) you get a response like this:

The ripple with this simple RC filter is about 22mVp-p (0.44% of full scale or 0.9% of the output at 50%). As you can see it doesn't get from 0V to 2V all that quickly. A rule of thumb is that you'll get 99% of the change within 5 time constants (365ms in this case).
The larger the RC time constant, the longer it will take to settle, and the lower the ripple will be. So with your 1K resistor you'll be getting more than 3x the ripple (more than 70mV of p-p ripple)
So there is a straightforward trade-off between settling time (we would prefer faster) and ripple (we would prefer less ripple) by altering the time constant. A more complex circuit can give you faster settling and lower ripple. To a first order, and within reasonable limits, it's the product of resistance and capacitance that matters.
Note that 1K is also getting into the range where linearity will be noticeably affected because the AVR chip outputs are not exactly symmetrical and are non-zero resistance (though better than some other MCUs).
Some types of capacitors also have non-ideal characteristics that can affect the output voltage (due to leakage) and the ripple (due to ESR).
And, of course, a simple PWM like this provides an output that is ratiometric to the supply voltage and other pins sinking or sourcing large amounts of current may change the filtered PWM output voltage a bit.
The input bias current of the TLV2451 is less than 7nA so you might well choose to use a much higher value resistor and a small ceramic capacitor. For example, a 1\$\mu\$F X7R ceramic capacitor and a 100k\$\Omega\$ resistor would give similar (a bit slower/less ripple) results to your 22\$\mu\$F electrolytic capacitor and 3.3k\$\Omega\$ resistor.