The Omega Pharma-Quickstep rider triumphed in a bunch sprint at the end of a challenging day that took the race from Stoke-on-Trent to Llanberis.
An 11-strong breakaway had operated out on its own for most of the day but was reeled in with just one kilometre remaining in the Snowdonia National Park.
That brought Manxman Cavendish into his own and he was able to see off the challenge of stage one winner Elia Viviani (Cannondale) and Steele Van Hoff (Garmin Sharp).
Wiggins, who powered his way to the gold jersey with a dominant performance in the stage three time trial, finished in the peloton to stay in front with four stages to go.
Cavendish was generous in sharing the praise at the end of the 190.9km stage, admitting he would have been in no position to triumph in the sprint without the solid foundations laid by his team-mates.
Iljo Keisse was part of the breakaway group throughout, while Cavendish's one-time rival Alessandro Petacchi led him out just before his powerful finish.
"I am really, really happy about my victory and the super job of the guys," Cavendish said. "Fortunately we had the entire day with Iljo in the break, so we didn't have to ride behind. The guys stayed with me the entire day. On the last climb...I have to say I was at the limit - but the guys stayed with me and brought me back.
"They showed a big commitment. That is why I did my best in the sprint. Even Petacchi, who was still suffering from the crash of a couple days ago, wanted to be there. He really led me out in the final. He put me in the best position for the sprint.
"We have been rivals for a lot of my career but he's a really good guy. Obviously the Tour of Britain is my home race but he is a big factor in me coming here because I wanted to ride with him."
Omega Pharma-Quickstep sport director Brian Holm added: "Iljo did a great job for us today, we really didn't have to work because he was in the breakaway.
"We just followed and won the sprint with the British Champion. We knew Cav had a fair chance for the sprint. Petacchi just delivered him perfectly. Cav was 10th in the TT yesterday so we knew he was in pretty good shape and riding well."