This is a debatable question but I would go with Sachin Tendulkar. Sunil Gavaskar was great in Test cricket but not so much in ODI’s. Gavaskar was purely a batsman but Tendulkar was quite handy as a bowler.
In favour of Gavaskar he faced one of the most hostile fast pace bowling from peak West Indies, at a time when players played fiwtout helmets, with small bats, big boundaries, and hardly any bowling restrictions on short bowling. He had an average of 51 in tests which is great for that time as well. Even in ODI'S he improved in the last 2–3 years and ended up with one century and 3092 runs with an average of 35. Had his ODI record better he could been neck to neck with Sachin. His strike rate was another weakness with a strike rate of 40 in tests and 62 in ODI. As a bowler Gavaskar hardly did anything substantial with only 2 wickets to his credit. Another negative aspects of his career was the 36* of 174 balls in the 1975 world cup which is one of the worst innings ever played in international cricket. He didn't perform well in any of the world cups for India except 1987. He failed spectacularly in the 1983 world cup which india won. In the 1987 however he scored 300 runs which is more than half of his total world cup runs.
Now coming to Tendulkar he didn't faced the prime West Indies bowling but still he played Walsh and Ambrose along with other great bowlers like prime Wasim Akram, Waqar Younis, McGrath, Lee, Warne, Murli, Vaas etc. Tendulkar unlike Gavaskar was an agressive batsman whose Test strike rate was almost same as Gavaskar’s ODI strike rate and in one days he had a healthy strike rate of 86. Even his average of 53 in tests and 44 in ODI is better. He is the highest run scorer in ODI and tests since about two decades and unless Root breaks his test tally he is going to remain at the top for eternity. Tendulkar was more than just a part time bowler. He led India to victory with his bowling multiple times. He has 2 give wicket hall and overall 201 wickets to his credit. In the world cup Sachin had the highest runs in two editions 1996 and 2003. Also he was the second highest overall scorer and highest scorer for India in the 2011 world cup.
All in all both players belong to very different period and thus comparison is unjustified but still on purely basis of stats Sachin seems ahead of Gavaskar.