You don't really need either form of have: Hard work is the key to success [in life]. (Where else can one have success?) This sentence also answers your question. Since the nounsuccess can follow to, to must be a preposition, not part of an infinitive (to have). The gerund is used after all prepositions: to