What does stalwart mean? Where does it come from?

A stalwart person is reliable, dependable, resolute (or inflexible depending on your perspective.) The word is probably a  14th Century Scottish variant on a old English term: stælwierðe "good, serviceable,"

In the US the term acquired a political dimension with a section of the Republican Party  that refused to abandon its Civil War hostility to the south. They became known as the 'Stalwart Party', a label that stuck