One thing I'd like to expand on to those who don't know how greater energy means greater speed.
The kinetic energy equation is 1/2massvelocity^2=KE
Since the KE increases from the momentum transfer, and mass of the object stays constant, the only thing that can change is velocity, where it has to go up.
ex: KE=2, m=1 2=1/21v^2, v=2
Now if some momentum were transferred, and the kinetic energy increased to KE=8,
8=1/21velocity^2, velocity=4, since the mass can't change
(also both scared and curious of what might result from dropping below 0 karma)
sorry kshacker, I may have thrown you off the scent here. My explanation of the slingshot effect is right, but it doesn't look like slingshotting is what the spacecraft is using to increase its speed:
the original article doesn't actually mention this at all, but it links to another one which tries (so vaguely it's misleading IMO) to explain the maneuver: https://mashable.com/article/nasa-parker-solar-probe-speed
tl;dr: the spacecraft is just falling into the Sun, which is why it speeds up. It isn't gaining speed relative to anything else, and it loses that speed again once it flies away from the Sun. It is using Venus to get closer to the sun each time around by damping its angular momentum, which works but I don't know how to explain that in an ELI5 way.
so it's actually a little anticlimactic.
BlarfMcFlarf and pfdietz got this right below in their comment thread:
"What the Venus flybys did was not add energy so much as remove angular momentum. The hard part about getting close to the Sun is that conservation of angular momentum prevents it."
...and icehawk and vl correctly point out that you can't really use the Sun to increase your within-solar-system speed. Thanks to them for prompting me to look into this further. The cool slingshot maneuvers all involve planets, not the sun.
...but I think the key answer that none of us quite articulated to your question:
How is the spacecraft using the slingshot effect to increase its speed each time around?
...is that it isn't!
...the article dramatically describes it as "picking up speed" each time it goes around the sun, but that is misleading. It is just getting closer to the sun every time around, so of course it goes faster the closer it gets.
the cool part if any is how it uses Venus to get closer to the sun (by sapping angular momentum), but that's hard to explain in a nutshell and doesn't really relate to your energy question.
so that is hopefully now a better answer to this mystery that brings together what some of the other commenters have pointed out.
That's correct, the energy comes from the body the spacecraft is slingshotting around (the Sun in this case). It's not mass or gravitational energy or anything weird like that, it's actually just a momentum transfer, the same as if the two objects had collided and bounced off each other elastically (i.e. without loss of energy to heat). So a (miniscule amount) of momentum (velocity x mass) is being transferred from the Sun to the spacecraft, and that's where the energy comes from.
(source: I studied physics and had a grandparent at NASA who worked on Voyager II and talked about this issue with me; but it's been a while since both of those things, so anyone with more fresh experience feel free to chime in!)