The speaker continues with another example of the passage of time.
The speaker calls the sun a "glorious lamp" because it gives off light.
"A-getting" is just an older or poetic way of saying "getting."
The sun isn't actually running a race; "race" can mean "journey, voyage, path."
The progress of the sun through the sky, which is how we measure a day, recalls the first stanza's discussion of "today" and "tomorrow.