Hamilton, 1888. This angle looks east of the downtown core... the "east end" of that era because it doesn't look like there was much more than a few blocks of buildings right of the church (I think that's
St. Patrick's), with forest beyond it.
This could be late 19th or early 20th century, one of two "incline railways" up the Niagara Escarpment in the city:
Source for both pics