You should do research about functions and references and gain a general understanding of how they work.
Here is how you could fix this.
On your GatherBall class, you need to pass a reference to the GameInfo class, so you could add a parameter in your CheckForWin functions
In your header:
void UGameInfo::CheckForWin(AActor* OverlappedActor)
In your cpp:
#include "GameInfo.h"
#include "Wed3182Character.h"
//function
void UGameInfo::CheckForWin(AActor* OverlappedActor)
{
class AActor* OtherActor;
OtherActor = OverlappedActor;
AWed3182Character* MainCharacter = Cast<AWed3182Character>(OtherActor);
if ((MainCharacter)) //<-This doesn't work.
}