Kremlin-backed support for Donald Trump’s candidacy over social media began much earlier than previously known, a new analysis of Twitter data shows.

Russian Twitter accounts posing as Americans began lavishing praise on Mr. Trump and attacking his rivals within weeks after he announced his bid for the presidency in June 2015, according to the analysis by The Wall Street Journal.

A...