Don't know about a specifically sporting context although baseball does have three strikes and you're out. I suggest that it may be related to auctions where you often hear 'going once, going twice, SOLD', but this may also be an example of an older usage where asking three times is considered enough.
It's from the banns of marriage, isn't it? They're read three times and the congregation is asked if they know cause why these two should not be joined in marriage. The priest then says 'this is for the (first, second or) third time of asking'
Does it come from Horse Racing, ie The starter asks the jockey to approach the stalls / tape and if after the third attempt the horse still refuses they are disqualified? Does any one agree?
Smorodina is definitely right. This use goes back several centuries. The priest announces that X and Y are planning to get married each week for three weeks ending "This is the first /second/third time of asking."