Is it allowed and does it make any difference?
As far as caffeine I am not sure where the Jockey Club stands.
For gatorade (sugar + electrolytes) these are certainly allowed and many performance horses (not just racehorses-- endurance, showjumping, etc.) receive them as a daily ration. Although sugar supposedly blocks absorbtion of the elctrolytes so many horse electrolytes are sugar-free.
Horses that need to run a long distance in a race (such as trotting horses) are more likely to receive electrolytes than sprinting horses. In hot, humid conditions, however, electrolytes probably benefit most performance horses and are relatively inexpensive.
One example of electrolytes for horses: (6.95 for 5 lbs!)
http://www.statelinetack.com/viewProduct.do?prodNum=EI3-120908
Okay, I was curious so I looked it up. Caffeine and theobromine (a caffeine-like substance found chocolate) are both banned substances in racing. If a horse tests positive they are disqualified and forfeit their winnings. According to this article, just a handful of m&m’s daily for a week is enough to have a testably illegal level in the bloodstream (although many agree that such a low level probably does not affect performance).
I don’t know about coffee or Gatorade, but according to the Funkle brothers[sup]*[/sup], they are allowed to drink wine.
[sub]*Simon and Gar[/sub]