Substitute Jeff Goulding hit the only goal of the game as promotion-chasing Cheltenham Town claimed all three points at Accrington.
Goulding broke the deadlock just two minutes before the break with a long-range, looping strike into the top left corner - just seconds after coming on.
It was the Robins' first shot on target as Stanley created the better chances.
But that made it five straight victories for Cheltenham, who moved up into the automatic promotion places.
Accrington loan striker Will Hatfield had a fierce shot saved by Cheltenham keeper Jack Butland and James Spray was denied from close range as the home side had the better of the first half.
But when Goulding was summoned to replace James Spencer, who had been booked and was in danger of picking up another card, moments later he collected Luke Garbutt's ball forward 30 yards out and looped the ball over the stranded Ian Dunbavin.
After the break, Alan Bennett had a shot cleared off the line for the visitors and Russell Penn could only find the side-netting in a breakaway as Cheltenham looked for a two-goal cushion.
Stanley threw everything at Cheltenham in the last 10 minutes but the visitors held on.
VIEWS FROM THE DRESSING ROOM
Cheltenham Town boss Mark Yates told BBC Radio Gloucestershire:
"The performance wasn't as good as we wanted, but all credit's got to go to Accrington. We took one of a couple of chances that came our came our way.
"Sometimes you've got to come away and win ugly and we've done that.
"We're just under a third through the season now and we're where we want to be [third in the table after the game], where we think we should be and where we want to see ourselves.
"We've got to embrace where we are we've got to enjoy where we are. Enjoy being at the right end of the table and not let it affect us. If we're scared of it we'll just drop away."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.