The part of the story that the question is asking about is part two of the story. I've always liked how "An Occurrence at Owl Creek Bridge" doesn't tell the story is a linear, chronological manner. Part two is a flashback. Part one explains that there is some guy about to be hanged from a bridge. Part two gives the backstory to that guy on the bridge.
His name is Peyton Farquhar. He's married, and he is a plantation owner. Readers are told that he longs to partake in the war in some manner.
. . . he chafed under the inglorious restraint, longing for the release of his energies, the larger life of the soldier, the opportunity for distinction.
The "gray-clad soldier" gives Farquhar just such an opportunity. Farquhar and his wife are sitting outside of their house when the soldier rides up. Mrs. Farquhar quickly goes to get the solider a drink. While she is inside, the solider tells Farquhar that Union troops are at the Owl Creek bridge. The solider also tells Farquhar that the bridge is lightly defended and susceptible to sabotage.
"Only a picket post half a mile out, on the railroad, and a single sentinel at this end of the bridge. . . I was there a month ago," he replied. "I observed that the flood of last winter had lodged a great quantity of driftwood against the wooden pier at this end of the bridge. It is now dry and would burn like tinder."
Mrs. Farquhar returns, the soldier drinks, he thanks them, and he rides off. I don't really think Mrs. Farquhar has much to do with propelling the plot forward, but the soldier definitely does. The final sentence of section two tells readers that the southern soldier was actually a Federal scout in disguise. This means that the man being hanged on the bridge in section one is actually Peyton Farquhar. Additionally, Farquhar was deviously lured to the bridge. The soldier played on Farquhar's desire to be a part of the war, and Farquhar took the bait. Unfortunately, it cost Farquhar his life.