Now Attila, having once more collected his forces which had been scattered in Gaul [at the battle of Chalons], took his way through Pannonia into Italy. . . To the emperor and the senate and Roman people none of all the proposed plans to oppose the enemy seemed so practicable as to send legates to the most savage king and beg for peace. Our most blessed Pope Leo -trusting in the help of God, who never fails the righteous in their trials - undertook the task, accompanied by Avienus, a man of consular rank, and the prefect Trygetius. And the outcome was what his faith had foreseen; for when the king had received the embassy, he was so impressed by the presence of the high priest that he ordered his army to give up warfare and, after he had promised peace, he departed beyond the Danube.
Raphael has a famous painting depicting the meeting between Leo and Attila. At this point in his campaign Attila's resources were probably already stretched quite thinly, so Attila was likely open to persuasion already; but that's often the trick of diplomacy, and the point at which it requires the greatest courage. After all, Valentinian III, the Western Emperor at the time, seems to have decided to hole himself up in Ravenna during the crisis; someone had to stand up to bat. Leo tried to repeat the success when the Vandals came a few years later, under Genseric; they were not dissuaded -- but he still seems to have drawn out of them a promise not to burn the city. And when they left after ten days of pillaging, he helped Rome rebuild and recover.
Even more importantly, but not related to invading Barbarian Hordes, Leo is notable for the Tome of Leo, one of the greatest expressions of Chalcedonian Christology ever written.