The plane could be seen making a U-turn in the sky over Swansea at around 4:20 p.m.
It is understood that the plane declared an emergency before leaving the UK and the pilots dumped fuel over the Cardiff and Swansea areas to reduce weight and prepare for a landing d ’emergency.
The plane returned to Heathrow Airport about an hour after departure.
A British Airways spokesperson said everything was done as a precaution.
“The plane landed safely after our highly trained pilots chose to return to Heathrow as a precaution,” the spokesperson said.
“We have expressed our apologies to our customers for the delay in their trip, and we will get them back as quickly as possible. “