Whilst a lot of people in here have most likely nailed the difference between the Ops Manager and Chief Engineer, Star Trek seems to have this habit of making the officers of those two positions interchangable. For example, I can just as easily imagine Data being the Chief Engineer and Geordi at Ops (in fact, in Parallels, Data took over engineering when Geordi was incapcitated, and Geordi took over at Ops in Powerplay when Data was possessed.) Harry Kim and B'Ellana switched positions now and then, O'Brien was both, and even the Science Officers of both TOS and ENT seem to assist the engineering department from time to time.
Thing is, this is true to varying degrees of MANY officers, from all departments. As you mentioned, science officers would sometimes assist with repairs, as would security officers (Worf, in an ep whose name escapes me - I'll find it later if anyone is curious - showed up in engineering during a crisis. Geordi sees him and comments that he's just the man he wanted to see, that he could really use Worfs help with getting the shields up and running again). This may be less true with enlisted personnel, but with full, academy-graduated officers, there seems to be a LOT of fairly high-end cross-training.
The Ops officer (Data in TNG, O'Brien in DS9 and Kim in Voyager) was supposedly responsible for the upkeep of the systems on the ship.
Not really, no. Where was it ever stated that the
main role of the Ops officer was ship/system upkeep? Granted, the Ops officer on each show DID do maintenance and upkeep (and I think that of all the positions, operations and engineering may have the most training/tasks in common), but nowhere was it established that keeping things running was the
primary responsibility of operations. Things were a bit hazy with Data, especially early on, but that's because (as someone pointed out) the entire idea of an operations department had just been invented, and prior to that, the idea of Data being a science officer had been tossed about. Even though that may be the real reason that Data operated the sensors so much, I think that in-universe, that makes some sense. Science officers are analyzing data as it comes in, and using the sensor arrays to scan specific anomalies, or look for specific types of readings. But it's the Ops officers who monitor the more general, constant scanning that goes on. Ops is the guy with the binoculars, scanning both the water below and the skies above for threats, other vessels, objects of interest, etc. Science is the guy with the more specialized equipment who analyzes said objects of interest
after they have been found (in the same way that tactical would be the guy who is chiefly responsible for handling a threat once
it's been found).
Aside from that, as others have mentioned, Ops handles resource allocation, acting as the link that binds all the other departments together in terms of figuring out who gets to do what with sensor arrays, laboratories with special equipment, and overall available power. They do seem to do a lot of repair work, but my interpretation was always that the engineers have more of a focus on hardware in general, and propulsion systems in particular, whereas operations officers are your computer repair technicians. There definitely IS overlap, though, especially if an individual officer - regardless of department - displays that he or she simply is well-suited to a particular repair job.
Another aspect of their job that I see is, in fact, BEING redundant. Intentionally so. All available tactical officers are tied up during a crisis, yet there is another tactical-oriented job that needs to be done? Operations can do that. Engineering is full with repairs
in engineering, leaving no one available to tackle the problems in the computer core? Operations can do that. And so on.
O'Brien was a weird case in that he seemed to be both the Ops Manager and Chief Engineer (certainly, on the
Defiant, there was no question that he was the man in charge in engineering). His title was "chief of operations", but I think in that case, that was meant to be a more general, overarching descriptor of his role as "master of all things technical" on the station. A proper starship "operations officer" as seen in Kim and Data would have a role more distinct from (yet still similar to in some ways) an engineering officer, as I've described above.
That's my take, anyway.