If you're talking about drinking champagne, I can't tell you when that tradition began. If you're talking about spraying champagne as a celebration, you can look to a particular incident in France in 1967.
Ford had tried and failed to buy Ferrari. This led to a fierce rivalry on the track in endurance sports car racing. The 1966 Le Mans 24 hour race saw a Ford sweep, taking the top three places with the brilliant GT-40. In 1967, Ferrari humiliated Ford at Daytona. The Italians finished 1-2-3, sweeping the podium. Ford fought back at Sebring and won. The 1967 Le Mans race was a showdown between two of the most iconic automobile companies in history.
The Ford GT-40 and Ferrari's 330P4 were a good match. Racer Chris Amon said
“The P4 was a very pleasant car to drive, as it was a great deal more nimble than the Fords I was used to. Although it lacked the ultimate top end pace of the 7-litre Ford, it gave you the feeling that you could drive it to the maximum for the whole race, which really wasn’t the case for the Fords, especially the brakes …”
Both cars featured powerful engines, low-slung aerodynamic bodies, and the backing of the best automotive engineers on the planet. The drivers were a dream team of talent drawn from around the globe. The GT-40 could do more than 210 mph down the huge Mulsanne straight, for example. In 1967…stew on that a moment, if you would.
In fact, those low-slung bodies were a problem for the hero of our story. He stood 6 foot 3 inches tall, much taller than most other drivers. So to accommodate his massive frame and his big helmet, they had to install a bubble in the roof of the car. Dan Gurney was paired with his rival, A.J. Foyt (and managed by the legendary Carroll Shelby). The four car Ford team was evenly split between Firestone and Goodyear tires, with Gurney on the Goodyears. The speculation was that infighting within Ford would be sure to rear its ugly head. Sure, the GT-40 was faster than the Ferrari in the short run, but it wasn’t able to go flat out for long stretches. If you didn’t hold back just a bit, you were likely to over stress one part or another (usually the brakes) and find yourself out of the race. Surely the Ford teams would compete with each other purely over the difference in tires alone. Add in Gurney and Foyt fighting for who was faster and you were sure to have at least one GT-40 sidelined in short order.
For the first hour and a half, they were right.
Then Gurney and Foyt took the lead. They never gave it back. Foyt and Gurney held back from their ultimate potential speed so that the GT-40 would last 24 hours. In the end, Ferrari were reduced to tailing the Ford and flashing their lights at it, trying to force a mistake. Fed up with this, Gurney simply pulled over at Arnage. He was leading by four laps of the huge circuit, and the Ferrari pulled in behind him. Two race cars fully capable of doing 200 mph sat there by the road, not moving an inch. Finally, the Ferrari driver figured out that Gurney wasn’t going to budge. The Ferrari pulled out, Gurney followed, and the race ended in a Ford win—an American-built car, with an American team, featuring American drivers.
So, obviously the team was elated. Dan Gurney mounted the podium and looked down. There he saw the journalists who had predicted his failure.
Cue a pivotal moment in the expression of happiness in history.
Dan Gurney was given a magnum of champagne, and he and sprayed everyone within range—especially those journalists. In spontaneous moment, Dan Gurney created a tradition. If you skip to 1:38 of this video, you can see a brief clip of the moment Nearly every race on the planet now ends with the winner spraying champagne, and the practice has grown to include other celebrations as well.
Here is Dan describing the moment in his own words
So, you now know where the tradition of spraying champagne began. 1967, Le Mans, France, in the hands of the legendary Dan Gurney.