BEIJING—A gauge of China's factory activity showed fresh signs of strength in June, pointing to improvement in the world's second-largest economy as export demand improves and a government stimulus program takes hold.

The HSBC preliminary—or flash—manufacturing purchasing managers index came in at a seven-month high of 50.8, up from 49.4 last month, according to data released Monday by HSBC Holdings PLC and data firm Markit. It was...