Wilson got Gatsby's name from Tom.
At the end of the novel, Nick sees Tom again on an afternoon in late October. He asks Tom what he said to Wilson.
Tom tells Nick that he told Wilson "the truth". Tom says that he told Wilson who the car belonged to - Gatsby - and if he hadn't, Wilson would have killed him on the spot.
Tom also says that Gatsby got what he deserved and he expresses a belief that it was Gatsby who was driving the car the hit and killed Myrtle, not Daisy.
There is no doubt the Tom was the one who gave Gatsby's name to Wilson.