Add 6 cups water to a 3-quart heavy-bottomed saucepan. Bring to a rolling boil over high heat.
While the water heats, rinse the hulled millet in a fine-mesh strainer under cool running water for about 30 seconds. Drain well. Peel the sweet potato and cut it into 1/2-inch cubes.
Once the water is boiling, add the drained millet and cubed sweet potato. Stir once and let the water return to a gentle boil.
Reduce the heat to low or medium-low. Simmer for 20 minutes, stirring every 5 minutes and scraping the bottom of the pot. The congee is ready when the millet is soft and the sweet potato mashes easily. If the millet is still firm, simmer 5 to 10 minutes longer, adding hot water 1/4 cup at a time if needed.
Beat the egg in a small bowl with a fork or small whisk.
With the congee at a gentle simmer, slowly drizzle the beaten egg into the pot in a thin stream while stirring gently with a wooden spoon or chopsticks.
Add the goji berries and stir gently once or twice. Cook for 30 to 60 seconds, just until the egg is set and the goji berries soften slightly.
Turn off the heat as soon as the egg is set. Let the congee rest for 2 minutes. Taste and add a small pinch of salt if desired. Serve warm.