President Donald Trump acknowledged his election loss and condemned an attack on the U.S. Capitol in a video on Twitter Inc. late Thursday, a day after his support for the attackers led to bans from social-media companies.