WASHINGTON—President Trump mixed Thanksgiving cheer with politics on Thursday, offering gratitude in calls to members of the military while continuing his feud with the judiciary and talking up border security.

“It’s a terrible thing when judges take over your protective services, when they tell you how to protect the border. It’s a disgrace,” he complained on the call with service members and officers representing five service branches.

Speaking...