U.S. equities gave up early gains and finished lower on the first trading session of the year.