I had encountered the phrase, “racing cert”, the other day, and I had to go look it up. The only definition I immediately found was one from UD:
English colloquialism. Born from gambling talk and used to indicate a statistical or logical outcome that appears to be a foregone conclusion.
It seems to be mostly related to horse racing, and used even in news articles as a jargon term (e.g. “Racing cert: The 400-year history of Perth racecourse”), but I had found no confirmation of that definition, nor explanation whence it came from exactly. If it has anything to do with so-called “racing certificates”, I could not even find meaningful explanation as to what that is, especially pertaining to horse racing. In other racing (auto, or sailing, for instance) it appears to be a sort of manifest clearing the participant (car or a boat) for the race after inspection, and for animals it also seemed to include veterinary check up. But I fail to grip how does that imply the “foregone conclusion”.
Note. As of this note, I picked a winner, although I thought all three answers were very helpful in understanding, and I upvoted them all. There are some question still unanswered (When did the meaning of this phrase went from ironic to literal? Are there any other examples of usage of “racing certainty” around 1834 St. Leger Stakes?), and if others add or improve their answers, I might reconsider. but generally, good answers.