Gravitational slingshot of light using a black hole/massive object Wikipedia has this page on gravity assists using planets. In some cases this effect was used to accelerate the spacecraft to a higher velocity. This diagram shows this in a very oversimplified manner. 

That got me thinking that if light is affected by gravity, and if it slingshots around the black hole/massive object, can't it gain a higher speed than $c$?
What limitations are stopping it from doing this?

Forgive me if the answer to this question is pretty straight-forward or staring-you-in-the-face kind. I haven't fully understood the mechanics of the gravitational slingshot fully yet, but I couldn't wait to ask this.
Note: If it is possible (I highly doubt that!), could you provide an explanation using Newtonian mechanics, I'm not very familiar with general relativity because I'm in high school.
 A: Newtonian mechanics are out of the question, but at least I can explain without using grad-level general relativity.  At the same time, I'm quite sure of the answer.
The mechanics internal to the black hole are, indeed, difficult.  But if you think about it, we can basically draw a system boundary around the black hole.  Its gravitational influence actually goes on forever, but we'll use the approximation of the sphere of influence.  Once the photon is far enough, it's basically no longer affected by the black hole.
That means that the black hole just acts like a mirror as far as we're concerned.  To see this, we need to consider the case of a stationary black hole, and adjust this by reference frame transformations.
In the reference frame of the black hole, there is no frequency shift of the photon between entering and exit.  Only momentum is transferred.  As the photon gets close to the circular orbit, it's energy has increased a great deal, but it will give this energy back to the gravity well as it exits.  Just like driving down a hill and then back up.  In order for me to convince you that the photon's energy does not change from entering to exiting, I will argue that the black hole's kinetic energy does not change.  Since we're in the black hole's reference frame, it's velocity is zero.  With a differential change to velocity, $v^2$ will be effectively zero.  We can use the reverse logic by assuming the photon does transfer energy, and show a contradiction.  Since the black hole gains no kinetic energy, if the photon's energy changed, that must be exhibited in some property of the black hole.  But there is no property subject to change.  The entering and exiting processes are time-symmetric so the black hole's rest mass can not have changed.
Hopefully I have convinced you that this black hole operates identically to a mirror.
With that info, we can simply apply the relativistic Doppler effect.
$$1 + z=\frac{1}{\sqrt{1-\frac{U^2}{c^2}}} $$
This equation describes the relativistic redshift factor, $z$, of a photon when you transfer from one reference frame to another moving at some relative velocity (in the same direction as the photon's motion).  We must apply that twice, because the black hole is a moving reference frame.  Here is my description of the sequence of events:


*

*Photon moves toward black hole in lab frame with initial frequency $f_1$

*Black hole observes photon's frequency as $f_1'$, shifted by $U$, in its reference frame

*Black hole emits photon at same frequency in its reference frame, formally $f_1'=f_2'$

*Lab frame observes a $f_2$, which is $f_2'$ shifted by $U$


This would be true for any mirror moving at relativistic velocity.  The situation you described is just a fancy mirror.  I don't have your numbers, but for closure, I'll give this equation (from definition of redshift factor):
$$1+z = \frac{f'}{f}$$
You might need to give some more thought to the sign of $U$ in applications here.  Basically, apply these equations such that $f_1'<f_1$ and $f_2'>f_2$.
A: Cute idea, +1. Let's think about where the slingshot boost of $2u$ comes from. In the center of mass frame, symmetry guarantees that the test particle exits with a speed equal to the speed with which it entered. If you set this up so that the deflection is nearly 180 degrees, then the problem becomes one-dimensional, so in the c.m. frame, the entry and exit velocities are $v$ and $-v$. Now let's switch to some other frame such as the frame of the sun. This involves adding $u$ to all velocities, so the entry and exit velocities become $v+u$ and $-v+u$. The difference in speed is $2u$.
But this derivation assumed that velocities add linearly when you change frames of reference, which is a nonrelativistic approximation. Relativistically, velocities combine not like $u+v$ but like $(u+v)/(1+uv)$ (in units where $c=1)$. If you put in $v=1$, the result for the combined velocity is always 1.
This is a funny case where we can get the answer to a gravitational problem purely through special relativity. We might worry that the SR-based answer is wrong, because we really need GR for gravity. But we can get the same answer from GR, since GR says that a test particle always follows a geodesic, and a lightlike geodesic always remains lightlike. The reason SR worked is that an observer could watch a patch of flat space far away from the black hole, observe a wave-packet of light passing through that patch on the way to the black hole, and then observe it again on the way back out. Since the patch is flat, SR works.
The patch argument also justifies using the SR equation for the Doppler shift to find the effect on the energy and momentum of the scattered wave. This effect happens without a change in velocity. The black hole recoils, and the total energy-momentum is conserved.
