Sao Paulo-born Roger Guerreiro, given Polish citizenship in April 2008 to allow him to play in the European Championships, saw a delightful angled chip sail over substitute goalkeeper Boaz Myhill with 10 minutes left.
The Hull stopper was only a couple of yards off his line, but he could not stop the effort finding the top corner.
Wales had hit the bar through Joe Ledley and produced a decent performance, and did not deserve to lose.
Bellamy passed a late fitness test on his knee and captained Wales, winning his 55th cap.
Wayne Hennessey returned in goal after Myhill had been the number one in Wales' last match in Denmark last November.
Wales boss John Toshack also opted for three central defenders, with Sam Ricketts moving from full-back to partner Lewin Nyatanga and Ashley Williams.
Poland had Arsenal keeper Lukasz Fabianski in their starting line-up with Bolton's Ebi Smolarek on the bench.
It was one of the more unusual venues for a Wales match. In the eastern corner of the Algarve, on the banks of the Rio Guadiana - the border with Spain - and in an athletics stadium overlooked by a lighthouse.
The crowd consisted of a few hundred hardy souls from both countries, for a match that was a warm-up for World Cup games next month.
And Wales fielded yet another very young side, lacking a string of Premier League players who had pulled out.
Poland, much more experienced, had three good early chances. Hennessey only half stopped a 20-yarder from Rafal Murawski, before Mariusz Lewandowski fired just over from the edge of the box.
One high-speed run from Bellamy threatened to open up the Polish defence, before they broke away again for Jacek Krzynowek to drill in a left-wing cross that Lukasz Gargula failed narrowly to reach at the far post.
Then Bellamy was away again from a Ledley pass, chipping the ball over Fabianski before seeing Michal Zewlakow clear the danger.
Wales were improving and another Bellamy run and cross gave Ched Evans a half-chance. Evans then got away from Zewlakow before pulling the ball back for Bellamy to hook over from 12 yards.
And after 33 minutes Wales almost took the lead. Bellamy's free-kick curled into the box and Ledley produced a clever chip to clear Fabianski with the ball bouncing onto the bar.
Zewlakow hacked the ball away, and from Bellamy's corner David Edwards' header was cleared off the line by Murawski.
Confidence was flowing from Wales, and Bellamy got away again a couple of minutes later only to see a low drive miss the far post by inches.
Three minutes from the break a fortunate deflection gave Robert Lewandowski a clear shot from the edge of the box, but Hennessey produced a fine save low to his left.
Wales sent on Myhill, Aaron Ramsey, Sam Vokes, Carl Fletcher and David Cotterill at the break, with Hennessey, Ledley, Evans, Jack Collison and Bellamy all going off.
The Poles also switched goalkeepers, with Celtic's Artur Boruc taking over from Fabianski. Smolarek, Roger Guerreiro and Wojciech Lobodzinski replaced Rafal Boguski, Gargula and Jacek Krzynowek.
A driven free-kick from Gareth Bale flicked off Nyatanga's head and flashed wide, after both Ramsey and Cotterill had created chances from the flanks.
Poland then sent on Pawel Brozek for Robert Lewandowski, before Fletcher was booked for a foul on Murawski.
Poland made their sixth substitution when Lukasz Tralka took over from Murawski, while Guerreiro was booked for kicking the ball away from a free-kick.
Myhill then produced a fine save, low to his left, to keep out a drive from Mariusz Lewandowski.
But after 80 minutes Myhill found himself beaten by a flighted chip from Guerreiro, from way out on the right.
The ball sailed over the Hull keeper, despite his despairing effort to claw the dropping ball away.
Wales' frustrations were clear when Cotterill was booked for a foul in the closing minutes.