Aircraft fly a lot more like performance cars drive at a track than grocery-getters drive. This is partially by design.
When an aircraft takes off, the engine is going to be at full power. This is the equivalent of hammering the gas pedal all the way down in a car. The same often happens for climbing and some maneuvers. The result is that the engine is in its max power band for a lot of typical flying.
Gas mileage, or fuel consumption as it’s typically called in aviation, is primarily a function of the rpm of the engine. Suppose a 4 cylinder, 4 stroke engine, idles at 800 rpm and achieves max power at 3500 rpm (all reasonable numbers for small piston driven aircraft), it makes intuitive sense that the aircraft will burn less gas at 800 rpm, 1600 cylinder firings a minute, than at 3500rpm/7000 cylinder firings a minute. Since the pilot will typically go full power every take-off and often for climbing, this means the plane engine will be burning maximum fuel. While flying straight and level, the pilot will often back off to about 2000rpm (this number has huge variation, but that number, 2krpm, is again within the typical GA envelope).
With regards to fuel consumption as a function of power, the economical pilot will want to minimize fuel consumption at a given level of power, that power output necessary to achieve straight and level flight. Take off and maneuvers will remain at max power to get away from the airport as quickly as possible. Most aviation accidents happen at or near an airport, due to traffic, increased maneuver rate, etc., so safety issues are involved. Once away from the airport and engaged in straight and level flight, a bigger engine with a lower cruising rpm, say 1200rpm compared to the 2000 rpm above, will get better gas mileage.
In the aggregate, there is no way to determining for sure which is better for fuel consumption. Engine efficiency, power, flight conditions, and many more factors play a role. What can be said with a high degree of certainty is that there is no absolute rule. Smaller engines ARE NOT always more fuel efficient than larger ones, especially between engines close to each other in size and weight.