The Blades had the best chances of the first period with Chris Morgan and Darius Henderson going close with headers.
Ched Evans came close with a free-kick for Kevin Blackwell's side early in the second half before the hosts took the lead.
Trundle was dragged down in the box before stepping up to slam the penalty home.
Stephen Quinn put the visitors back on level terms after 73 minutes when he scored from close range.
The Swans were reduced to 10 men three minutes later when Jordi Gomez was sent off for a second booking but the hosts claimed the win with a spectacular strike from Butler.
Ferrie Bodde made his return to the Swansea midfield after 10 months out but lasted only 10 minutes after breaking down in the middle of the pitch.
Paulo Sousa's side were looking for their first win in five games, a run which has seen them draw three games and score just two goals.
The Blades had a good chance from a free-kick but Morgan's header flew over the bar.
Henderson was able to get between two defenders to head a long ball goalwards but it was easily collected by Swansea goalkeeper Dorus De Vries.
Nathan Dyer had Swansea's best chance but his strong drive from the edge of the area was well parried by Blades goalkeeper Mark Bunn.
United had an early chance in the second period when David Cotterill was dragged down by Trundle. Evans lined up the effort and drove the ball over the bar.
From the resulting goal-kick Swansea broke to the other end where Trundle was hauled down by Nick Montgomery in the area.
Trundle stepped up to take the penalty and sent Bunn the wrong way to put the hosts ahead after 52 minutes.
The Blades battled on and found themselves on level terms though with 17 minutes to play when Stephen Quinn smashed the ball home after a good pass from James Harper.
Harper then came close to putting the visitors ahead but he smashed the ball over after surging forward from the midfield.
Gomez received his marching orders with 13 minutes to play when he chopped down Evans and was shown a second yellow card.
With the hosts looking down and out it was a shock to see them take the lead with eight minutes to play.
Substitute Butler picked the ball up 25 yards from goal and sent an unstoppable shot in off the post.
The hosts were reduced to nine men in the fifth minute of injury time as Dyer was dismissed for a second booking.