Al-Hasan (may Allah have mercy on him) narrates from Sayyiduna Abu Bakrah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) led a prayer of two rak'ahs, like this prayer of yours, during the solar and lunar eclipse.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الخسوف / 6357