Ribeiro's fourth-minute strike looked set to be the winner for the majority of the evening but the returning Grabban fired home with three minutes to play to ensure Forest would take the spoils on an important night on Trentside.
Chris Hughton made three changes to the side beaten by Brentford on Saturday as the suspended Tobias Figueiredo was replaced by Loic Mbe Soh, Harry Arter made way for Samba Sow and Alex Mighten came into the side in place of Joe Lolley while there was also a place on the bench for Grabban on his return from injury.
Forest desperately needed a bright start and they got it through Ribeiro's first goal for the club in the fourth minute of the contest. Good work from Sammy Ameobi saw him lay the ball off to Cafu, he shifted the ball out left to Ribeiro and the Portuguese rifled a low strike into the far corner of Joe Wildsmith's net.
That early opener had helped The Reds to grow in confidence and they were unfortunate not to have doubled their lead midway through the first half. Ameobi's excellent right-wing cross was perfect for Cafu to turn home on the edge of the six-yard box but the assistant referee had his flag raised for offside.
Wednesday hadn't really got going as an attacking force but they were almost handed an opportunity to level. Mbe Soh's header lacked power and fell to the feet of Kadeem Harris but the former Cardiff man could only lash a shot into the hands of Brice Samba from the edge of the Forest penalty area.
A big moment in the game came on 38 minutes as Forest came inches away from taking a two-goal lead. The Reds worked the ball into the Sheffield Wednesday penalty area and as Lyle Taylor stabbed the ball towards goal from six yards out, central defender Chey Dunkley got back superbly to clear the ball off the line and ensure The Owls survived without further damage.
Despite having the better of the chances in the first half, Forest were almost caught by a sucker-punch at the end of it. Barry Bannan's terrific delivery into the penalty area narrowly evaded the head of the onrushing Josh Windass and Adam Reach couldn't quite stretch far enough to turn the ball into Samba's net at the back post.
The opening stages of the second half were fairly uneventful with no clear goalscoring opportunities for either side. Ameobi tested Wildsmith from 25 yards with a strike from a central position but the Wednesday goalkeeper got down well to make a comfortable save.
There was always likely to be a nervy ending to the night with just the one-goal lead but Grabban made sure of the points with three minutes to play. The striker charged down the clearance from Tom Lees on the edge of the box, raced on and delivered an unerring finish into the far corner of the net to wrap up a crucial victory for The Reds.
Forest: Samba; Christie, Worrall (c), Mbe Soh, Ribeiro; Cafu, Sow, Yates; Mighten (Lolley 88'), Taylor (Grabban 76'), Ameobi
Subs not used: Smith, Bong, Jenkinson, Guerrero, Dawson, Arter, Swan
Goals: Ribeiro 4', Grabban 87'
Sheffield Wednesday: Wildsmith; Odubajo, Lees, Dunkley, van Aken (Rhodes 80'); Harris (Paterson 55'), Pelupessy, Shaw (Hunt 75'), Bannan (c), Reach; Windass (Brown 75')
Subs not used: Jackson, Palmer, Penney, Urhoghide, Kachunga
Booking: Odubajo 80'
Referee: Stephen Martin