Coach Mike Ruddock could only watch in disbelief as his players frittered away numerous chances and saw fly-half Nicky Robinson land only one place-kick at goal from four attempts in front of a 73,000 crowd.
Robinson came up trumps though with a 75th-minute drop-goal which put Wales ahead for the first time and spared their blushes.
Wales skipper Michael Owen scored a pushover try 14 minutes from time, but Fiji magnificently held out until Robinson struck after a scorching first-half try by lock Ifereimi Rawaqa, converted by centre Julien Vulakoro, and fly-half Seremaia Bai's crucial drop-goal.
To compound matters for Ruddock, he saw three key forwards - flanker Dafydd Jones, lock Brent Cockbain and prop Chris Horsman - depart injured, and they all appear doubtful starters against South Africa on November 19.
Fiji were superb in Cardiff, giving a huge lift to South Sea Islands rugby and almost leaving the Welsh capital with a win they could scarcely have believed possible.
Wales looked to make their presence felt from the start, but they encountered some aggressive Fijian tackling and it rattled the home side.
Wing Shane Williams lost his cool at one point - and then dropped a high ball in open play - while goalkickers Vulakoro and Robinson missed three penalties between them during the opening 10 minutes.
Fiji, who had never beaten Wales in five previous attempts, continued to fritter away penalty chances, with Vulakoro sending a 17th-minute shot wide.
Wales looked to have cracked Fiji open approaching the end of a poor opening quarter when centre Matthew Watkins sparked a promising move, but flanker Martyn Williams could not gather a pass around his ankles and the chance went begging.
Watkins' midfield partner Sonny Parker then set up another golden opportunity only for Williams to again spill the pass, this time a far more straightforward chance.
Things got worse for Ruddock when Jones limped off to be replaced by Alix Popham, before Robinson sliced a simple 35-metre penalty wide.
Cockbain joined Jones in making an early exit as he was stretchered off, and Fiji struck a minute before the break when lock Rawaqa sprinted 60 metres for a spectacular try which Vulakoro converted.
Fiji began the second period by pressing for another score, and Wales had to defend resiliently before mounting a swift counter-attack.
Wing Kevin Morgan was sent clear in space but he lacked the confidence to take on Fiji's last defender and another opportunity passed Wales by.
There was no let-up in terms of injuries for Ruddock, with Horsman hobbling away after 46 minutes. Ospreys prop Adam Jones replaced Horsman, while centre Ceri Sweeney took over from Morgan, which meant the impressive Watkins being switched to wing duties.
But there was still no sign of Wales scoring as the clock ticked past 50 minutes, and Fiji should have extended their lead, but Bai - who replaced Vulakoro as kicker after the centre missed four shots at goal - struck an angled 30-metre penalty off-target.
Bai dropped a goal two minutes later and Lee Byrne had a try disallowed by Scottish referee Rob Dickson following a forward pass.
Robinson opened Wales' account with a 58th-minute penalty, but they trailed by seven points entering the final quarter and it took the drop-goal after Owen touched down to belatedly save the day.