1. There were lots of poor people in the mid 1900s.

2. There were lots of poor people in the mid-1900s.
(Are both grammatical?)

#2 is correct because of the hyphen.