In-form Yorkshire captain Andrew Gale overshadowed Kevin Pietersen's comeback as Surrey's bowlers were made to work hard for wickets at Headingley.