Julius Erving's one of the GREATEST DUNKERS in the history of basketball ... and he tells TMZ Sports thatAaron Gordon deserved the dunk contest win!!
We talked to Dr. J -- who was in the building for the dunk contest -- at Reagan National Airport in Washington D.C. on Monday ... and we asked the hoops legend if the Orlando Magic star was robbed by the judges in Chi-town.
"I don't know if robbed is the right term, if it had ended in a tie, I don't think anybody would've been upset. But, a contest like that going into basically 2 overtimes. Third overtime. You hate to have a loser."
BUT, forced to pick a winner, Dr. J -- who won the inaugural ABA Dunk Contest in 1976 -- says Gordon's final dunk was justtttttttt a little better than Derrick Jones Jr.'s jam.
"I think [Gordon's] last dunk was cleaner. Neither one of them were 50's because they had shot their load in terms of their best stuff."