77 are the number of contemporary tzaddikim whose merit Moshe invoked to save the Jewish People after the sin of the Golden Calf: Aharon, his four sons, Pinchas, Calev, and the seventy elders. Hashem demanded the merits of eighty tzaddikim, though, and so Moshe filled the bill by invoking also the three Patriarchs. (Devarim Rabbah 3:15)

Incidentally, in another midrash (Shemos Rabbah 44:7) the seventy elders are omitted, and Moshe speaks only of seven contemporary tzaddikim plus the Patriarchs. There is a story in which R' Shneur Zalman of Liadi, questioned on this point by one of his opponents, resolved it by referring to a dispute elsewhere about whether each tribe is considered a separate "community" (in which case each one needs the merits of ten tzaddikim) or not (and then ten suffice for the entire nation).