while; at the same time; coincidentally
がてら expresses doing one thing while taking the opportunity to do another, often during a trip or errand.
This is a N1-level conjunction-like particle that means doing something 'while' or 'at the same time' doing something else. The action that comes before がてら is the main purpose, and the action after it is the secondary, often incidental, thing you do on the way. For example, 散歩しがてら (while taking a walk) you might buy groceries. The nuance is that you do the second action because it is convenient or fits with the first, not as the main goal.
がてら is quite formal and literary. In everyday conversation, you would normally use ついでに (on the way, while at it) or ながら (while doing). However, がてら appears in written narratives, essays, and polite announcements. It is not rude, but it sounds bookish, so you would not use it in casual chat with friends.
Note that がてら is often used when going somewhere: the ます-stem verb indicates the activity you are doing while traveling, and the second clause describes what you do at that place. It is not used for purely simultaneous actions like 'watching TV while eating' — that is ながら.