Of course, the word has a relation to Eveline's state of mind at the time. The word "swaying" is a kind of psychic index of Eveline. The technique that Joyce adopts, from a Modernist point of view is the technique theoretically defined by Eliot as "Object Correlative." In '"Object Correlative," an external object is to stand as a correlative of the mental process at work.
In the final moment of departure, Eveline is undecided and undecidable whether she should leave Ireland with her lover or stay back to hold on to the family. This wavering mind and its crisscross of dilemma is what seems to be represented by the swaying movements of the crowd. The confusion is also broadened in this extension as her indecision spreads across a larger group of people all around the port.