At the level that I play on, I can normally keep all the cities but it can be a struggle.
Firstly, if it has flipped to you (without rock bands or spies) then you should have some population pressure on it so it isn't a lost cause. You should be able to hold it.
1) Buy a monument (+1 loylty)
2) Slot in the couple of cards that add loyalty (with a governor or unit) (+4 loyalty, I believe)
3) Increase the population as much as possible (granary, water mill) and
4)
MOVE as many trade routes as possible to this city - choose the destinations that add the most food.
5) You must have at least one city that put pressure on the new city and so do the increase population there as well (trade routes and so on).
As the cities that belong to you grow, the loyalty loss should get down so that the city would be lost in maybe 20 turns and you have bought yourself some time...….
This is when attack becomes the best form of defence.
With Eleanor you should be able to have a good shot at flipping other cities that are putting pressure on you. If your new city already has a theatre square you are laughing - buy the art museum amphitheatre and broadcast center and put works of art in them. -6 loyalty.
If no theatre square then put in the governor with the promotion that allows you to buy districts (Raynor) and do the same.
Put Amani in one of the near cities and she will also produce -2 loyalty in the nearby cities.
Then you can start to use spies and rock bands (with the right promotion - glam rock) and off you go.
So to sum it all up - get the loyalty down as much as possible immediately, then get the population up as much as possible in the city and all others close to it, then.....start being devious
Oh and one last thing - although I can probably find ways of keeping a city if it flipped to me, I sometimes wonder afterwards if it was the right thing to do as it can suck up all my money and faith to keep just one city and maybe that would have been spent better elsewhere.....
And it might re-flip to you later especially if you put Amani nearby....