The sponsorship includes exclusive official gin pouring and activation rights across 15 of the UK's most famous racecourses, as well as a fully integrated marketing campaign for Greenall's Gin.
The brand says the deal offers the potential for it to reach 2 million customers per year at 340 racing events, plus exposure to 20 million TV viewers.
Greenall's owners, Quintessential Brands, said it is committing £3 million over the three years in "activating the partnership".
Warren Scott, chief executive of the Quintessential Brands Group, said: "We are incredibly proud that Greenall's Gin is supporting the Great British institution that is horseracing and The Jockey Club. We both have a history dating back to the mid 1700's and share a common vision to be the best in the world in our respective fields."
Simon Bazalgette, group chief executive of The Jockey Club, said: "I believe this will prove a fantastic partnership built on shared values around excellence and heritage, and a simple desire for our customers to enjoy themselves. As a sport, British racing welcomes around 6 million spectators a year to our venues and more than 40% of UK television viewers watched racing on Channel 4 last year. We are a sport with scale and a desire to work with like-minded partners like Quintessential Brands and its Greenall's Gin to achieve mutual success and growth."
Greenall's The Original London Dry Gin was first distilled in 1761. Greenall's sold 3.2 million 70cl bottles in 2014 and is distributed in over 30 countries globally.
The Quintessential Brands Group was founded by Enzo Visone and Warren Scott in 2011 and includes the Quintessential Brands Company, Essential Drinks, G&J Distillers, First Ireland Spirits and Marblehead Brand Development. Its brands include Greenall's. Bloom gin and Berkeley Square London Dry Gin.
The Jockey Club turned over £166.9 million in 2013 and owns 15 racecourses including Aintree, Epsom Downs and Newmarket.