Germany and Italy formed the nucleus of the axis powers. Even the name refers to the axis between Berlin and Rome. Japan later joined and together they formed the Tripartite pact (Dreimächtepakt). This pact claimed to be primarily aimed against Bolshevism (read: the Soviet Union) but was in fact an alliance aimed at fundamentally restructuring Europe and Asia (the treaty text refers to that exactly).
Italy under Mussolini was in fact the first country to adopt fascism as a form of government - indeed the name comes from the italian fasces - literally bundles of sticks (It's a Roman thing.) Much like the German fascists, the Italian fascists dreamed of recreating a greater Italy, mostly by becoming the dominant force in the Mediterranean again. To achieve this, they wanted to bring the Adriatic coast under their control and defeat Greece. First they attacked and occupied Albania in April 1939, from which they launched an attack against Greece in October 1940. This invasion was, to put it in the most charitable terms, a complete and utter disaster. The Greek Army quickly beat back the invasion and went on the offensive, eventually occupying parts of Albania. Mussolini appealed to Hitler for help, which came in April 1941 and ended in the defeat and occupation of Greece.
At the same time, the British had defeated an Italian attack into Egypt and had gone on the attack there as well, capturing an entire Italian army group of some 130,000 soldiers plus tanks and equipment in a lightning campaign between December 1940 and early February 1941. Again the Germans had to send help, which finally led to the establishment of Rommel's Afrikakorps.
As for the role this all played in Barbarossa, it's a bit more complicated. The narrative is certainly attractive - the forces that had to be committed were missing during the Barbarossa buildup and delayed the launch of the operation for a few crucial weeks. But it's not that simple.
For one, the spring thaw/mud period in Russia lasted longer than usual in 1941, so Barbarossa could probably not have been launched much earlier than it actually was unless the Germans wanted to lose all momentum due to the mud and give the Soviets time to mobilize.
For another, the German victories during Barbarossa were hard-fought, and they were hampered by consistent logistical issues. Both of these would have been there, whether they went to support the Italians or not. The fact of the matter is that the Germans couldn't push any further when winter finally came because they had outrun their logistical tail and were bogged down by repeated Soviet counter attacks. Neither Leningrad nor Moscow would have fallen easily, and there are good arguments to be made that the loss of both would not have meant the end of the war with the Soviet Union.
So, in conclusion, the campaigns to support the Italians did drain away significant German resources, but they very likely were not the sole reason why Germany failed to achieve its objectives in Barbarossa.
It is easy to make the case that Italy hampered German operations in World War II. She invaded Greece and then got bogged down, her troops were the weak point in Africa and this compelled the dispatch of Rommel and the Afrika Korps in early 1941, Italian troops were among those routed around Stalingrad in winter 1942-3.
But, Italy contributed forces that, reinforced with a few German units, kept large British forces tied down in North Africa and the Mediterranean Sea, delaying D Day. Germany's allies (Italy, Romania, Hungary, Finland) provided hundreds of thousands of troops to man the huge positions occupied in the East.
Few troops were up to German standards in 1942, from any country. Germany needed her Allies, and many Allied (British, US) soldiers came to admire their Italian counterparts for being persistent despite being poorly led and often resented, and used as bait, by German commanders.