Hundreds of protesters gathered in the Chinese financial hub of Shanghai on Saturday to oppose plans for a lithium battery factory, highlighting growing social tension over pollution.