In the UK on much public transit, you may see a sign like this near the entrance of the vehicle:

The text reads:
Priority Seat for people who are disabled, pregnant or less able to stand
The images represent a pregnant woman, a skirted individual carrying a small child, and a person with a cane.
Until recently, I tended to avoid the seating area labeled as above so that I don't have to get into this exact situation. If this is the only place available for you to sit when you get on the bus/train, take it without concern but be prepared to move (without attitude) without being asked.
If the bus/train is very full and all of these seats are occupied and you see someone in need looking for a seat, feel free to offer it, particularly if they fall into one of the three categories on the sign. I've personally offered a seat to people not in these categories in the past, often when I'm nearing my stop or if they really seem to want a seat.
Pregnant women often have issues with balance, so being able to sit on a moving vehicle saves them from the risk of a fall. Elderly individuals start to have issues with balance, too, and may get tired easily. Particularly if they use any sort of walking assistance, offer them a seat. Be aware, too of riders who have disabilities that may not be immediately apparent, such as the blind. Having a spot near the entrance can make it much easier for them to use transit.
One group that hasn't been mentioned in your question is people with small children. Particularly infants and children under three, it can be very considerate to offer seats to the parent (with their child to sit in their lap) as squirmy kids can be a handful.
In general, as someone who has been pregnant and has a small child, I have never felt patronized when someone offers me their seat... which I think is where your question goes wrong. Being polite - if it is sincere - is always an appropriate action. Unfortunately, you can't control how others respond but if they respond in a way that is haughty and disdainful of your action, that is their problem, not yours. Don't let their ill-mannered response make you feel poorly.