What is this part on a Cessna 172 engine?
NOTE: Revised in response to poster comment: The engine is a Lycoming O-320 D2G, part of the series that replaced the disastrous H2AD engine which that '77 172 originally came with, in 1981 (the H2AD was '77 to '80). The H2AD engines (I have to think some joker at Lycoming put the AD designation in as a gag — it had a number of ADs against it), among other problems had a very small valve lifter contact face that would spall very quickly and trash the camshaft (on the plus side, you can remove the lifters without splitting the case).  Most 77-80 172s have had their H2AD engines replaced with Ds, which went back to the old lifter design, which also applies to the airplane pictured.

Anyway, the fitting is tapping into an oil gallery that supplies the valve lifters and has a plug at each end.  Someone has removed the plug at the front and installed the elbow to run oil pressure back to a cockpit indication, possibly because the port normally used on the accessory case is being used for something else.