My understanding (though I'm no astrophysicist) is that gravity boost from a planet works because of the relative velocities between the planet and the sun, whereas trying to use the sun's gravity to boost your solar system escape velocity would fail since gravity would be fighting you on the way out just as much as it was helping you on the way in.
Yes, this is basically correct. What a gravity boost from a planet does is transfer a very small amount of the planet's orbital kinetic energy to the spacecraft; it puts the planet into a slightly smaller orbit, and boosts the spacecraft to a higher speed on its way out. Since the Sun is what the planets are orbiting, this trick obviously won't work the same way with the Sun.
(Technically, the Sun itself, or more precisely the center of mass of the Solar System, is orbiting the center of the galaxy; so I suppose it would be theoretically possible to fly a spacecraft by the Sun in such a way as to transfer a very small amount of its orbital kinetic energy with respect to the center of the galaxy to the spacecraft, so it would fly outward faster than it went in, even after taking into account the slowdown climbing out of the Sun's gravity well. But I doubt we're going to be in any practical position to try this any time soon.)
Yes, this is basically correct. What a gravity boost from a planet does is transfer a very small amount of the planet's orbital kinetic energy to the spacecraft; it puts the planet into a slightly smaller orbit, and boosts the spacecraft to a higher speed on its way out. Since the Sun is what the planets are orbiting, this trick obviously won't work the same way with the Sun.
(Technically, the Sun itself, or more precisely the center of mass of the Solar System, is orbiting the center of the galaxy; so I suppose it would be theoretically possible to fly a spacecraft by the Sun in such a way as to transfer a very small amount of its orbital kinetic energy with respect to the center of the galaxy to the spacecraft, so it would fly outward faster than it went in, even after taking into account the slowdown climbing out of the Sun's gravity well. But I doubt we're going to be in any practical position to try this any time soon.)