The first two stages run through Yorkshire in northeast England, with the third going from Cambridge to London.
Sport minister Hugh Robertson says "we want to help deliver a world class event that boosts all local economies where the race will pass through and encourages more people to get involved in cycling."
The rest of the £21 million will come from local authorities and other partners. The Tour is expected to boost the economy in Yorkshire by more than £100 million.
The Tour starts on July 5, with the first stage taking riders from Leeds to Harrogate.