President-elect Donald Trump has an opportunity to establish "American leadership through innovation," Bill Gates told CNBC on Tuesday.

"A lot of his message has been about ... where he sees things not as good as he'd like," the billionaire Microsoft co-founder said on "Squawk Box."

"But in the same way President Kennedy talked about the space mission and got the country behind that," Gates continued, "I think whether it's education or stopping epidemics ... [or] in this energy space, there can be a very upbeat message that [Trump's] administration [is] going to organize things, get rid of regulatory barriers, and have American leadership through innovation."

Gates said he recently spoke on the phone with Trump, and discussed the power of innovation. "Of course, my whole career has been along those lines. And he was interested in listening to that. And I'm sure there will be further conversation."

Gates said it was the first time he had spoken with Trump, though he said they have mutual friends.

Read more on CNBC's Gates interview

Trump likes a 'good deal,' so he should like my clean energy ideas, Bill Gates says

As Dow approaches 20K in Trump rally, stocks are expensive, Bill Gates says

Bill Gates hopes Trump won't get into a tariff 'tit for tat' with China

Bull market or bear, Bill Gates follows Warren Buffett'sinvesting strategy