Okay I'll try to explain this without copying and pasting from someone else's sports article.
First off, Roger Federer will gain nothing (ranking points wise) even if he wins Wimbledon again. Tennis rankings are based on what you've done in the past year (Not calendar year, but just in exactly the past year since the current time). This is why it is so hard for players to stay on top of the rankings or stay near the top while it is much easier to move up. A Grand Slam title, like Wimbledon, is worth up to 2000 ranking points. If you win it, you get 2000 points. However, that means that you must defend those 2000 points one year later. That is the dilemma that Roger Federer is currently facing.
Meanwhile, Rafael Nadal did not play at Wimbledon last year, meaning that he lost his 2000 points (Because he won it in 2008) last year, but since he now has nothing to defend from 2009, he has zero to defend now. This means that he can gain up to 2000 points but won't lose anything.
Nadal currently holds 8745 points while Federer is at 8525.
So the best that Federer could do in Wimbledon is to keep the gap close. If Roger can win the title he won't lose anything. Nadal is guaranteed to gain at least 10 points just for making the 1st round (This is to award qualifiers). After that, Rafa will gain 45 total points if he makes the 2nd round, 90 if he makes the 3rd, 180 for achieving the fourth, 360 for making the quarterfinals, 720 if he earns a berth in the semis, 1200 if he reaches the final, and 2000 if he wins the entire tournament.
What those numbers show is that the points you receive increase exponentially as you get further. For example, notice how the first two wins earn you 90 points but if you win the last two (semis and the final) it's worth 1280 points (the difference between the 2000 for winning the tournament and the 720 you get if you lose in the semifinals).
All that being said, Roger Federer would need to win Wimbledon so as to not take a hit of at the least 800 points, and hope that Rafael Nadal gets no further than the quarterfinals. Even if Federer wins the tournament, if Nadal reaches the semis, the gap will increase to almost 1000 points (Calculations below)
Nadal (8745 + 720 = 9465)
Federer (8525 + 0 = 8525)
If Nadal reaches the final his lead will increase by even more, and of course if he wins the tournament he will gain 2000 points plus that means Federer will lose many as well, so the gap would be AT LEAST 3000 points if Rafa wins the tournament
Nadal (8745 + 2000 = 10745)
Federer (8525 - AT LEAST 800 = AT MOST 7725)
So Federer's only chance to get the ranking back from Nadal in the near future (Prior to the U.S. Open) is to win Wimbledon, hope that the gap is still under 1000 points because...
Most of the top players only play two tournaments between Wimbledon and the U.S. Open. These tournaments are the Masters Series 1000 tournaments in Canada and Cincinnati. Federer won the one in Cinci, meaning he once again has a lot of points to defend here, 1000 to be exact, as that is how many points a win at one of these tournaments is worth. However, Federer only made the quarterfinals of the Rogers Cup in Canada last year, meaning he received 180 ranking points for that tournament and therefore could potentially gain 820 more if he wins the tournament. Meanwhile, Rafael Nadal also made the quarterfinals at that tournament, so he has 180 he could lose.
So, if Federer is able to keep the gap between them under 1000, which would require him to win Wimbledon and for Nadal to lose in the semifinals (Calculations below)
Nadal 8745 + 720 = 9465
Federer 8545 + 0 = 8545
9465 - 8545 = 920
Then Federer would potentially be able to take the ranking back at the Rogers Cup later this summer if he wins the tournament and Nadal fails to make it past the 2nd round.
I know this is all very confusing and if you need further clarification just ask in Additional Details about what part you don't get and I'll be glad to help.