Seventh-placed Ipswich twice led in front of their biggest crowd of the season at Portman Road thanks to goals from Paul Anderson and Paul Green, but they were pegged back, first by brilliance and then by good fortune.
Steve Cook's amazing overhead kick ensured parity at the interval and Ritchie made it a point apiece when his 20-yard free-kick was deflected off Cole Skuse and wrong-footed Dean Gerken.
What proved to be a fantastic final hour of play was in stark contrast to a stale opening third.
Bournemouth shaded it, with Yann Kermorgant heading just over and Eunan O'Kane side-footing hopelessly high and wide when well-placed to score in the penalty area.
It was, therefore, slightly against the run of play that the home side broke the deadlock after 36 minutes.
Stephen Hunt's quick throw found Skuse, who did brilliantly to head the ball into space and play a delicious cross which was fired home by Anderson at the far post.
And Town came so close to making it two just minutes later when Aaron Cresswell's devilish 20-yard free-kick was superbly tipped onto a post by Lee Camp.
Bournemouth responded well before the break with Lewis Grabban firing just wide of the far post under heavy pressure from Cresswell.
And they were level a minute before the break from the most unlikely of sources - and with a cracker of a goal.
Charlie Daniels' free-kick was headed up into the air and Cook's fantastic overhead kick was only helped into the net by Gerken.
Anthony Wordsworth then could only find the body of Camp from 20 yards out to complete a pulsating end to the first half.
Ipswich recovered their lead in the 56th minute when Cresswell swung over a teasing free-kick from the byline and substitute Green headed home.
Bournemouth should have drawn level for a second time in the 65th minute when a decent build-up down the right ended with Simon Francis pulling the ball back, but Danny Pugh fired over from eight yards when it had looked easier to score.
As the 10th-placed visitors pushed to keep their play-off dreams alive, sub Tokelo Rantie got clear of Town keeper Gerken but Tyrone Mings hacked the danger clear.
But just seconds later, the equaliser duly arrived - and in the cruellest of circumstances.
Ritchie's free-kick from 20 yards was well struck but only beat Gerken courtesy of a deflection off Skuse in the Town wall.
Both sides had great chances to claim a winner with Mings missing the far post by inches with a header and Kermorgant testing Gerken from 20 yards with a powerful shot straight at the relieved Town keeper.