No, Stuart wasn't to blame for the loss at Gettysburg. He shoulders some of the blame as 8BallTiger points out, but even his ride was well within the bounds of the orders given to him by Lee. Unfortunately Stuart became caught on the wrong side of the Union Army and his insistence on keeping the spoils of his successes along with the poor condition of his horses and constant harassment by Union forces all contributed to his long path back to Confederate lines. However, it's important to note that Stuart was given rather vague and expansive verbiage in his orders and how to achieve his objectives. This penchant for such vagueness on Lee's part was a critical problem throughout the campaign, see the "if practicable" order given to Ewell on Day 1 that would haunt them for the rest of the battle. Stuart was ultimately undone by placing a higher emphasis on Lee's orders to cause havoc and gather supplies than too screen the army. This leads us to a third problem for Stuart's detractors, there was another cavalry force Lee could have used, but chose not too. John Imboden's brigade was the rearguard for Lee's army and was probably, in the absence of Stuart, used improperly by Lee or at least wasted by Lee in the gathering of intelligence. This was likely because of the absolute faith Lee had that Stuart would not have left his army blind of the enemy's movements, but that hardly absolves Lee of grossly misusing his best option for screening and intelligence gathering as mule tenders for the duration of the campaign.
While he can certainly be criticized for falling off the grid during the campaign, he's not the only one who should shoulder blame. It was Lee's decision to send in Longstreet's men on the third day aka Pickett's Charge. You can also blame Longstreet for not carrying out the order in the way Lee wanted. You can also praise the Union army, because the battle was never a foregone Confederate victory that somehow got away