By the time Gagarin did his thing there was no lack of enmity between the US and the USSR, as well as jealousy on the American side for the superior Soviet space program. Was jealousy the only thing Americans felt for Gagarin or was there also a sense of pride on a whole-human-race level for such an achievement?
Yuri Gagarin was on the cover of the April 21 1961 issue of TIME magazine. What that made the American public think can be gauged by two Gallup polls, taken in June 1961. The first one, published on June 4th shows 38 % thought Russia was ahead in the space race, 38 % thought the USA was ahead in the space race and 24 % had no opinion. A second Gallup poll was conducted June 23rd to June 28th 1961. This poll asked the question "How important do you think it is for the United States to be ahead of Russia in space exploration ?" 51 % thought it was very important, 21 % fairly important 23 % not too important and 5 % had no opinion. If anything, Yuri Gagarin's space flight seems to have caused American public opinion to demand an even greater effort to catch up to and surpass Soviet efforts in the space race.
Gagarin went on a world tour after he returned, visiting much of Western Europe, China, the Middle East, etc. The US government was the only government not to send an invitation or congratulations, but the US public was very interested to see Gagarin.
In a heartwarming tale of Cold-War cooperation, thousands of Americans wrote to Gagarin congratulating him on his feat, despite the official stance of the US government.