As the governor of a liberal-leaning state that was the first in the nation to legalize gay marriage more than a decade ago, Mr. Baker has on social issues taken many positions to the left of national Republicans.