U.S. equities reversed course in the final hour of trading and finished lower, erasing solid early gains and adding to weekly losses.