וּבְקֻצְרְכֶם אֶת קְצִיר אַרְצְכֶם לֹא תְכַלֶּה פְּאַת שָׂדְךָ בְּקֻצְרֶךָ וְלֶקֶט קְצִירְךָ לֹא תְלַקֵּט לֶעָנִי וְלַגֵּר תַּעֲזֹב אֹתָם
When you reap the harvest of your Land, you shall not completely remove the corner of your field during your harvesting, and you shall not gather up the gleanings of your harvest. [Rather,] you shall leave these for the poor person and for the stranger
וְכַרְמְךָ לֹא תְעוֹלֵל וּפֶרֶט כַּרְמְךָ לֹא תְלַקֵּט לֶעָנִי וְלַגֵּר תַּעֲזֹב אֹתָם
And you shall not glean your vineyard, nor shall you collect the [fallen] individual grapes of your vineyard; you shall leave them for the poor and the stranger
( Chabad.org translations )
I always read these verses as saying that we should give פאה (a corner of the field designated for the poor to take) and לקט (forgotten stalks, left for the poor to take) and other מתנות עניים (gifts to the poor) like פרט ועוללות (grapes that fall off the vine by harvest, and funny-looking clusters of grapes [פאה ד:ג-ד]) to the poor and to the גר, because the גר is, generally speaking, in a disadvantaged position.
However, a friend of mine just raised the point that ממה נפשך -- if the גר is poor, then he is an עני (pauper); if he isn't poor, then (presumably) he doesn't take לקט and פאה.
So why should these verses specify גר?
The גר here is the גר צדק, the convert, as codified by Rambam (Rambam, Hilchot Matnot Aniyiim 1:9), who adds that we do not withhold charity from non-Jews, מפני דרכי שלום in order to keep the peace.