Niewiadoma, who put in a dominant display to win Stage 1, finished in fifth spot to maintain her lead over WM3 Energie teammate Marianne Vos, who came home fourth.
Barnes moves up to third overall thanks to the time bonuses at the end of the 139km stage from Stoke-on-Trent to Staffordshire.
The 93-rider field had toiled through wind and rain in a fast paced stage that started and finished in the city centre.
Marta Bastianelli and Anna Trevisi (both Alé Cipollini) and Alison Jackson (Bepink Cogeas) all spent time at the head of the race, but the move of the day came when Lucinda Brand (Sunweb) went clear on the steep, lower slopes of the opening climb.
Trixi Worrack (Canyon SRAM) and Christine Majerus (Boels-Dolmans) spent some time chasing, but all in vain as they were caught by a vastly diminished peloton before the final categorised climb of Gun Hill, with Brand holding her lead until the outskirts of Stoke-on-Trent as a thirty plus rider group made contact.
"It was a really hard day, we lost a bit of time on the GC yesterday so our goal was to go for the stage win,” Pieters said. "Our team was pretty strong today. Christine [Majerus] got in the front at one point and we were almost all there together going into the finish. We spoke about preparing for a sprint so they could save my energy, and the girls helped me really well in the finale.
"The climbs were really tough. The first one was long, the second was really steep and stayed steep all the time. We came back over the top of Gun Hill and I knew it was going to be a sprint. I'm really happy that the girls helped me today.”
Two further hilly stages in Warwickshire and Derbyshire are ahead of Niewiadoma on Friday and Saturday, before the flat final stage in London on Sunday.
"I don't want to overreact or get too confident, but this is another day done,” said the 22-year-old, who also leads the points classification. "Everything can happen, as we saw today. It's so hard to control it when lots of teams are attacking. I know that everybody wants that OVO Energy Green Jersey, so it's like one team versus all of the others. It's a big battle.
"There were a lot of times that I thought 'oh my god, goodbye green jersey'. But you can't lose hope, I tried to stay relax and calm. I knew that, even if Lucinda was going to stay clear upfront, other teams would want to target the stage win. That meant it wouldn't be up to us to chase all the time; other teams would feel a responsibility to bring it back.
Cervelo Bigla's Lisa Klein retained the sprints classification lead while Audrey Cordon-Ragot (Wiggle High5) extended her lead in the mountains classification, with Brand now her nearest challenger, six points adrift.
Stage Three takes the peloton 151km from Atherstone to Royal Leamington Spa.