Andros Townsend gave the hosts the lead at the end of a strong spell but a brace from Beattie either side of a scruffy goal from Joe Allen proved enough to inflict an eighth defeat in 10 league games on Keane's side.
Town had lost their last four league games, culminating in a humiliating 4-1 derby defeat at Norwich last Sunday, but they responded to record a midweek win over West Brom which booked their place in the semi-finals of the Carling Cup.
But league form is what matters most to Ipswich fans and Keane remains firmly under pressure after more woeful defending allowed Brendan Rodgers' men to escape with the points.
Swans striker Beattie had the first chance of the afternoon but could only head tamely at Brian Murphy in the goal after a good run and cross from Angel Rangel.
Rangel then suffered a moment of madness when he played a backpass blind across the face of the area to allow Tamas Priskin a shot on goal.
The Hungarian should have found the net but could only toe-poke his shot at goalkeeper Dorus De Vries.
The home side's fragile confidence in front of their own fans was evident as they appeared reluctant to keep hold of the ball while in contrast Rodgers' side were dominating possession.
Ipswich had hardly ventured out of their half for 15 minutes but almost snatched the lead on the half-hour mark through former Swansea striker Jason Scotland.
Grant Leadbitter fed a ball through to Scotland on the edge of the area and he showed remarkable strength to roll away from two challenges and fire in a curling effort which De Vries had to tip away to safety.
Ipswich started the second half in a similar vein and it was no surprise when Townsend gave them the lead in the 50th minute.
Gianni Zuiverloon moved the ball out wide to Carlos Edwards and when he looped over a cross to the far post Townsend came in off his wing to plant a powerful header past De Vries and into the bottom corner.
The goal capped a fine spell of pressure but the visitors responded well to take charge.
Beattie headed them level in the 64th minute as he took advantage of sloppy goalkeeping from Murphy.
Mark Gower swung in a free-kick from tight on the left touchline and Beattie got in front of a hesitant Murphy to head in from close range.
Confidence seemed to drain from the Ipswich players and Allen gave Swansea the lead in the 64th minute after some horrendous defending.
Andrea Orlandi cut the ball back from the left for Nathan Dyer to poke a shot goalwards. Tommy Smith blocked the shot but dithered in clearing the danger and Allen was able to tackle him on the six-yard line and force the ball over the line.
Keane was then left seething as referee Andy D'Urso waved away appeals for an 88th-minute penalty as Edwards appeared to be checked in the area, and Swansea moved down the field to score themselves within 30 seconds.
Substitute Darren Pratley found Beattie 25 yards from goal and the former Celtic man curled a sensational effort in off the far post.