But "if Elon Musk came into the 'Shark Tank' and told me to invest in his electric car company before he started it, I would say, 'You're crazy,'" O'Leary tells CNBC Make It.
O'Leary has been an outspoken critic of Tesla in recent years and has said its stock is overvalued. In the past, he has also said that he only invests in profitable companies to ensure his return on investment.
But nowadays, "Mr. Wonderful" has a different opinion of the company and its stock price.
"Am I a shareholder today in Tesla? Yes I am," O'Leary tells CNBC Make It. In fact, "my best performing stock, this year to date, [is] Tesla."
And O'Leary says he owes it all to his son, Trevor, who convinced him to buy the company's stock in 2019.
"My son went to work for [Tesla as an intern] and convinced me that it wasn't a car company I was investing in, it was a data technology company," O'Leary says. "Sometimes you have to think out of the box."
Analysts that have long supported Tesla have said the data the company collects from its customers is "one of the most under-valued areas of the business, which is significantly ahead of competitors," as CNBC reported in February.
"Every mile driven globally, [Tesla's] data gets smarter, the resolution better," O'Leary said on CNBC's "Halftime Report" on Wednesday. "This company is all about the future of autonomous driving."
In addition to the company's data, O'Leary was also impressed by the number of talented engineers that want to work for Tesla, he said.
Musk reacted to O'Leary's comments via Twitter on Wednesday, saying "Tesla & SpaceX are the top two destinations for engineers, because you can have the most fun creating kickass technology! That's why."
"His son sounds great btw," Musk added, referring to Trevor.
Now a Tesla convert, O'Leary admitted to "Halftime Report: that "sometimes you're just wrong. [Tesla stock] is not overvalued."
"When facts change, I change. [My] young electrical engineer son talked me into buying a stock I had no interest in," O'Leary tells CNBC Make It.
"Now I own Tesla and, wow, I bought it in the $200s last July. Look at it now." Tesla shares closed at $782.58 on Wednesday.
Tesla's market cap reached $100 billion for the first time on Jan. 22. And in May, its stock market value hit a six-month average of $100.2 billion, Reuters reported. It's current market cap is $146 billion.
"But Elon, I still would have said, 'no,' to you in the 'Shark Tank,'" O'Leary says. "Your idea was way too crazy. Right!"
Tesla did not immediately respond to CNBC Make It's request for comment.
Disclosure: CNBC owns the exclusive off-network cable rights to "Shark Tank."