The first Pokémon games, Pokémon Red and Green Versions, came to the Nintendo Game Boy system in Japan on February 27, 1996, which was the fulfillment of Satoshi Tajiri's dream and allowed people of all ages to catch, train and trade 151 creatures and become a Pokémon Master.
Initially, the Pokémon games had modest sales. However, after players discovered Mew in the games, the magazine CoroCoro announced a "Legendary Pokémon Offer" to distribute Mew to twenty entrants. The contest received 78,000 entrants, and the sales of the Pokémon games quickly increased. Due to high sales, Pokémon Red and Green were swiftly followed up with Pokémon Blue, which had improved graphics and sounds.
After the games, a Pokémon Trading Card Game was developed by Media Factory with its own set of rules. The first set of cards was released on October 20, 1996, containing 102 cards, and became very popular.
The franchise also won many manga interpretations, the first being Pokémon Pocket Monsters by Kosaku Anakubo, which was first collected and published in November 1996 by Shogakukan. This was chiefly a gag manga, using crude humor and slapstick, starring a Trainer named Red and his rude Clefairy.
The popularity of the franchise also led to an anime series based on the games, premiering in Japan on April 1, 1997. The main character was a young Pokémon Trainer named Satoshi (after Satoshi Tajiri, later dubbed in English to Ash Ketchum), based on Red. Another character introduced in the first episode was Satoshi's rival, Shigeru (after Shigeru Miyamoto, later dubbed in English to Gary Oak), based on Blue.
First, it is just easy to infer that the anime came after the games, since Pokemon is a video game based franchise. Just saying. But anyway, the first Pokemon games came before the anime, yes.
Hope this helps! :)