Basil is a clear foil to the malicious influence of Lord Henry Wotton. The two of them are old Oxford friends, but, frankly, we can't tell why they're friends at all – their views of the world seem to be totally different. Basil believes in the innate goodness of man, and he simply cannot believe that anything beautiful can be evil (like Dorian, for example). He recognizes that Henry's beliefs are corrupt and amoral, and tries to get Dorian to resist the other man's influence. Basil actively tries to save Dorian, first from Henry, then eventually from himself – but alas, Dorian's not interested in salvation.
Interestingly, Lord Henry and Basil do have one thing in common – they both view Dorian as an artistic inspiration. However, while Basil actually uses Dorian as a model for his art, painting, Lord Henry's art project is far, far creepier – he uses Dorian himself as the canvas for his dark, philosophical experiments.