It seems that the problem is more cities vs rural as opposed to liberal vs democrat.
However, for some reason, the cities seem to attract democrats and leftists.
There are liberals & conservatives living in cities, just more liberal live in cities than do conservatives. The conservatives in cities tend to be more moderate. So yes, cities play an integral role. What the dynamics are, have been debated without much consensus being reached that I am aware of.