Decide on the type of edging material. For a structured look, or to add definition to the walkway, use natural stones, bricks or pavers.
Measure the width of the edging material, and mark an equal distance from the edge of the walkway with a tape measure and garden stakes. Wind a string around the stakes down the length of both sides of the walkway.
Rake back the gravel from the sides of the walkway. Unearth dirt and grass within the outlined space with a shovel, and keep digging for 4 inches if you're edging with stones or pavers. Tamp down the dirt at the bottom with the back of a hoe or a tamper tool.
Pour 2 inches of coarse masonry sand along the trench and tamp it down.
Set the bricks or natural stones in the trench side by side, or set the bricks end to end lengthwise for a narrower border. Place the materials flush together, leaving as little space as possible between them. Hit each brick or stone with a hammer to embed it in the bed of sand and make the pieces level with each other. Continue setting the materials until the trench is filled.
Backfill the gaps between the edging and the gravel with crushed limestone. Sweep the limestone into crevices between the materials to lock them in place. Rake the gravel back against the edging.